OpenSSL: send no TLS1.3 session tickets
[exim.git] / src / src / tls-openssl.c
index 045e30a85f0ff95375d93c77711f8fabd2fc6448..b1f6bd4eb958e312a33b3bbfddfc8fe2ac0ea4fe 100644 (file)
@@ -94,6 +94,7 @@ change this guard and punt the issue for a while longer. */
 #ifndef LIBRESSL_VERSION_NUMBER
 # if OPENSSL_VERSION_NUMBER >= 0x010101000L
 #  define OPENSSL_HAVE_KEYLOG_CB
+#  define OPENSSL_HAVE_NUM_TICKETS
 # endif
 #endif
 
@@ -1809,6 +1810,10 @@ if (init_options)
 else
   DEBUG(D_tls) debug_printf("no SSL CTX options to set\n");
 
+#ifdef OPENSSL_HAVE_NUM_TICKETS
+SSL_CTX_set_num_tickets(ctx, 0);       /* send no TLS1.3 stateful-tickets */
+#endif
+
 /* We'd like to disable session cache unconditionally, but foolish Outlook
 Express clients then give up the first TLS connection and make a second one
 (which works).  Only when there is an IMAP service on the same machine.