summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2022-06-30 11:18:38 +0000
committertb <>2022-06-30 11:18:38 +0000
commitd4cf4432044589137756086ce6c52b4b13b7f563 (patch)
tree565a787539717391de8deb928753a351878c6b39
parent5f574489be242a7d86373038f340aaf574a0b228 (diff)
downloadopenbsd-d4cf4432044589137756086ce6c52b4b13b7f563.tar.gz
openbsd-d4cf4432044589137756086ce6c52b4b13b7f563.tar.bz2
openbsd-d4cf4432044589137756086ce6c52b4b13b7f563.zip
Check whether the security level allows session tickets.
ok beck jsing
-rw-r--r--src/lib/libssl/ssl_tlsext.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl_tlsext.c b/src/lib/libssl/ssl_tlsext.c
index fc6c11daa6..f103c2253e 100644
--- a/src/lib/libssl/ssl_tlsext.c
+++ b/src/lib/libssl/ssl_tlsext.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_tlsext.c,v 1.115 2022/06/29 17:39:20 beck Exp $ */ 1/* $OpenBSD: ssl_tlsext.c,v 1.116 2022/06/30 11:18:38 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2016, 2017, 2019 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2016, 2017, 2019 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> 4 * Copyright (c) 2017 Doug Hogan <doug@openbsd.org>
@@ -1124,6 +1124,9 @@ tlsext_sessionticket_client_needs(SSL *s, uint16_t msg_type)
1124 if ((SSL_get_options(s) & SSL_OP_NO_TICKET) != 0) 1124 if ((SSL_get_options(s) & SSL_OP_NO_TICKET) != 0)
1125 return 0; 1125 return 0;
1126 1126
1127 if (!ssl_security(s, SSL_SECOP_TICKET, 0, 0, NULL))
1128 return 0;
1129
1127 if (s->internal->new_session) 1130 if (s->internal->new_session)
1128 return 1; 1131 return 1;
1129 1132
@@ -1203,7 +1206,8 @@ int
1203tlsext_sessionticket_server_needs(SSL *s, uint16_t msg_type) 1206tlsext_sessionticket_server_needs(SSL *s, uint16_t msg_type)
1204{ 1207{
1205 return (s->internal->tlsext_ticket_expected && 1208 return (s->internal->tlsext_ticket_expected &&
1206 !(SSL_get_options(s) & SSL_OP_NO_TICKET)); 1209 !(SSL_get_options(s) & SSL_OP_NO_TICKET) &&
1210 ssl_security(s, SSL_SECOP_TICKET, 0, 0, NULL));
1207} 1211}
1208 1212
1209int 1213int