summaryrefslogtreecommitdiff
path: root/src/LibsslTLSContext.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2019-04-07 13:37:35 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2019-04-07 16:18:32 +0900
commit52da4e40ea22d1db13c1eadeac5baed4e8fd5dd8 (patch)
tree8091adba711093b9201845d9cd6b4ffdb9ea606b /src/LibsslTLSContext.cc
parent4af4a7cfc36936350bd2aa92a6e20384fc653a47 (diff)
Drop SSLv3.0 and TLSv1.0 and add TLSv1.3
TLSv1.3 support is added for GNUTLS and OpenSSL.
Diffstat (limited to 'src/LibsslTLSContext.cc')
-rw-r--r--src/LibsslTLSContext.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/LibsslTLSContext.cc b/src/LibsslTLSContext.cc
index 8cce672b..14e6f3fa 100644
--- a/src/LibsslTLSContext.cc
+++ b/src/LibsslTLSContext.cc
@@ -34,6 +34,7 @@
/* copyright --> */
#include "LibsslTLSContext.h"
+#include <cassert>
#include <sstream>
#include <openssl/err.h>
@@ -112,16 +113,21 @@ OpenSSLTLSContext::OpenSSLTLSContext(TLSSessionSide side, TLSVersion minVer)
long ver_opts = 0;
switch (minVer) {
+#ifdef TLS1_3_VERSION
+ case TLS_PROTO_TLS13:
+ ver_opts |= SSL_OP_NO_TLSv1_2;
+ // fall through
+#endif // TLS1_3_VERSION
case TLS_PROTO_TLS12:
ver_opts |= SSL_OP_NO_TLSv1_1;
// fall through
case TLS_PROTO_TLS11:
ver_opts |= SSL_OP_NO_TLSv1;
- // fall through
- case TLS_PROTO_TLS10:
ver_opts |= SSL_OP_NO_SSLv3;
- default:
break;
+ default:
+ assert(0);
+ abort();
};
// Disable SSLv2 and enable all workarounds for buggy servers