Skip to content

Commit 53dfbcf

Browse files
authored
Merge pull request #479 from remicollet/patch-1
SSL_CTX_set_max_proto_version requires openssl 1.1
2 parents ee21516 + 464bdd6 commit 53dfbcf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ssl/ssl_openssl_impl.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,8 +539,10 @@ OpenSslContext::OpenSslContext()
539539
, trusted_store_(X509_STORE_new()) {
540540
SSL_CTX_set_cert_store(ssl_ctx_, trusted_store_);
541541
SSL_CTX_set_verify(ssl_ctx_, SSL_VERIFY_NONE, ssl_no_verify_callback);
542+
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
542543
// Limit to TLS 1.2 for now. TLS 1.3 has broken the handshake code.
543544
SSL_CTX_set_max_proto_version(ssl_ctx_, TLS1_2_VERSION);
545+
#endif
544546
#if DEBUG_SSL
545547
SSL_CTX_set_info_callback(ssl_ctx_, ssl_info_callback);
546548
#endif

0 commit comments

Comments
 (0)