File tree Expand file tree Collapse file tree 5 files changed +23
-6
lines changed Expand file tree Collapse file tree 5 files changed +23
-6
lines changed Original file line number Diff line number Diff line change @@ -12591,12 +12591,13 @@ fi
1259112591done
1259212592
1259312593 # Function introduced in OpenSSL 1.1.1.
12594- for ac_func in X509_get_signature_info
12594+ for ac_func in X509_get_signature_info SSL_CTX_set_num_tickets
1259512595do :
12596- ac_fn_c_check_func "$LINENO" "X509_get_signature_info" "ac_cv_func_X509_get_signature_info"
12597- if test "x$ac_cv_func_X509_get_signature_info" = xyes; then :
12596+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12597+ ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12598+ if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
1259812599 cat >>confdefs.h <<_ACEOF
12599- #define HAVE_X509_GET_SIGNATURE_INFO 1
12600+ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
1260012601_ACEOF
1260112602
1260212603fi
Original file line number Diff line number Diff line change @@ -1358,7 +1358,7 @@ if test "$with_ssl" = openssl ; then
13581358 # function was removed.
13591359 AC_CHECK_FUNCS ( [ CRYPTO_lock] )
13601360 # Function introduced in OpenSSL 1.1.1.
1361- AC_CHECK_FUNCS ( [ X509_get_signature_info] )
1361+ AC_CHECK_FUNCS ( [ X509_get_signature_info SSL_CTX_set_num_tickets ] )
13621362 AC_DEFINE ( [ USE_OPENSSL] , 1 , [ Define to 1 to build with OpenSSL support. (--with-ssl=openssl)] )
13631363elif test "$with_ssl" != no ; then
13641364 AC_MSG_ERROR ( [ --with-ssl must specify openssl] )
Original file line number Diff line number Diff line change @@ -1362,6 +1362,7 @@ if sslopt in ['auto', 'openssl']
13621362
13631363 # Function introduced in OpenSSL 1.1.1
13641364 [' X509_get_signature_info' ],
1365+ [' SSL_CTX_set_num_tickets' ],
13651366 ]
13661367
13671368 are_openssl_funcs_complete = true
Original file line number Diff line number Diff line change @@ -259,8 +259,20 @@ be_tls_init(bool isServerStart)
259259 }
260260 }
261261
262- /* disallow SSL session tickets */
262+ /*
263+ * Disallow SSL session tickets. OpenSSL use both stateful and stateless
264+ * tickets for TLSv1.3, and stateless ticket for TLSv1.2. SSL_OP_NO_TICKET
265+ * is available since 0.9.8f but only turns off stateless tickets. In
266+ * order to turn off stateful tickets we need SSL_CTX_set_num_tickets,
267+ * which is available since OpenSSL 1.1.1. LibreSSL 3.5.4 (from OpenBSD
268+ * 7.1) introduced this API for compatibility, but doesn't support session
269+ * tickets at all so it's a no-op there.
270+ */
271+ #ifdef HAVE_SSL_CTX_SET_NUM_TICKETS
272+ SSL_CTX_set_num_tickets (context , 0 );
273+ #else
263274 SSL_CTX_set_options (context , SSL_OP_NO_TICKET );
275+ #endif
264276
265277 /* disallow SSL session caching, too */
266278 SSL_CTX_set_session_cache_mode (context , SSL_SESS_CACHE_OFF );
Original file line number Diff line number Diff line change 517517/* Define to 1 if you have the `X509_get_signature_info' function. */
518518#undef HAVE_X509_GET_SIGNATURE_INFO
519519
520+ /* Define to 1 if you have the `SSL_CTX_set_num_tickets' function. */
521+ #undef HAVE_SSL_CTX_SET_NUM_TICKETS
522+
520523/* Define to 1 if the assembler supports X86_64's POPCNTQ instruction. */
521524#undef HAVE_X86_64_POPCNTQ
522525
You can’t perform that action at this time.
0 commit comments