From 89757388c76ac876e57cfcb66a147b18c67d034a Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Fri, 16 Jul 2021 12:10:48 +0100 Subject: [PATCH] Disable SSL v1.1 --- mongoose.c | 1 + src/tls.c | 1 + 2 files changed, 2 insertions(+) diff --git a/mongoose.c b/mongoose.c index 4f450716..00dbc375 100644 --- a/mongoose.c +++ b/mongoose.c @@ -3684,6 +3684,7 @@ void mg_tls_init(struct mg_connection *c, struct mg_tls_opts *opts) { SSL_set_options(tls->ssl, SSL_OP_NO_SSLv2); SSL_set_options(tls->ssl, SSL_OP_NO_SSLv3); SSL_set_options(tls->ssl, SSL_OP_NO_TLSv1); + SSL_set_options(tls->ssl, SSL_OP_NO_TLSv1_1); #ifdef MG_ENABLE_OPENSSL_NO_COMPRESSION SSL_set_options(tls->ssl, SSL_OP_NO_COMPRESSION); #endif diff --git a/src/tls.c b/src/tls.c index 98e6ea28..a1f73da7 100644 --- a/src/tls.c +++ b/src/tls.c @@ -263,6 +263,7 @@ void mg_tls_init(struct mg_connection *c, struct mg_tls_opts *opts) { SSL_set_options(tls->ssl, SSL_OP_NO_SSLv2); SSL_set_options(tls->ssl, SSL_OP_NO_SSLv3); SSL_set_options(tls->ssl, SSL_OP_NO_TLSv1); + SSL_set_options(tls->ssl, SSL_OP_NO_TLSv1_1); #ifdef MG_ENABLE_OPENSSL_NO_COMPRESSION SSL_set_options(tls->ssl, SSL_OP_NO_COMPRESSION); #endif