Browse Source

Merge pull request #1149 from paullouisageneau/openssl-deprecated-tls-method

Change deprecated OpenSSL version-flexible TLS method
Paul-Louis Ageneau 1 year ago
parent
commit
feea658993
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/impl/tlstransport.cpp

+ 1 - 1
src/impl/tlstransport.cpp

@@ -578,7 +578,7 @@ TlsTransport::TlsTransport(variant<shared_ptr<TcpTransport>, shared_ptr<HttpProx
 	PLOG_DEBUG << "Initializing TLS transport (OpenSSL)";
 	PLOG_DEBUG << "Initializing TLS transport (OpenSSL)";
 
 
 	try {
 	try {
-		if (!(mCtx = SSL_CTX_new(SSLv23_method()))) // version-flexible
+		if (!(mCtx = SSL_CTX_new(TLS_method()))) // version-flexible
 			throw std::runtime_error("Failed to create SSL context");
 			throw std::runtime_error("Failed to create SSL context");
 
 
 		openssl::check(SSL_CTX_set_cipher_list(mCtx, "ALL:!LOW:!EXP:!RC4:!MD5:@STRENGTH"),
 		openssl::check(SSL_CTX_set_cipher_list(mCtx, "ALL:!LOW:!EXP:!RC4:!MD5:@STRENGTH"),