]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Set SSL_OP_NO_TICKET flag in SSL context for OpenSSL builds, to disable TLS stateless...
authorJames Yonan <james@openvpn.net>
Mon, 17 Mar 2014 00:49:36 +0000 (18:49 -0600)
committerGert Doering <gert@greenie.muc.de>
Mon, 17 Mar 2014 18:42:08 +0000 (19:42 +0100)
OpenVPN doesn't want or need SSL session renegotiation or
resumption, as it handles renegotiation on its own.

For this reason, OpenVPN always disables the SSL session cache:

SSL_CTX_set_session_cache_mode (ctx, SSL_SESS_CACHE_OFF)

However, even with the above code, stateless session resumption
is still possible unless explicitly disabled with the
SSL_OP_NO_TICKET flag.  This patch does this.

Acked-by: Steffan Karger <steffan.karger@fox-it.com>
Message-Id: <1395017376-24554-1-git-send-email-james@openvpn.net>
URL: http://article.gmane.org/gmane.network.openvpn.devel/8346

Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/ssl_openssl.c

index f079652667920f6ccd2966797cc3e1cf664b870c..68a1d591ecea37ff7763769be3069be76eafe02c 100644 (file)
@@ -180,7 +180,7 @@ tls_ctx_set_options (struct tls_root_ctx *ctx, unsigned int ssl_flags)
 
   /* process SSL options including minimum TLS version we will accept from peer */
   {
-    long sslopt = SSL_OP_SINGLE_DH_USE | SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3;
+    long sslopt = SSL_OP_SINGLE_DH_USE | SSL_OP_NO_TICKET | SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3;
     const int tls_version_min = (ssl_flags >> SSLF_TLS_VERSION_SHIFT) & SSLF_TLS_VERSION_MASK;
     if (tls_version_min > TLS_VER_1_0)
       sslopt |= SSL_OP_NO_TLSv1;