]> granicus.if.org Git - curl/commitdiff
openssl: Use TLS_client_method for OpenSSL 1.1.0+
authorJay Satiro <raysatiro@yahoo.com>
Wed, 27 May 2015 05:29:16 +0000 (01:29 -0400)
committerJay Satiro <raysatiro@yahoo.com>
Wed, 27 May 2015 05:30:30 +0000 (01:30 -0400)
SSLv23_client_method is deprecated starting in OpenSSL 1.1.0. The
equivalent is TLS_client_method.

https://github.com/openssl/openssl/commit/13c9bb3#diff-708d3ae0f2c2973b272b811315381557

lib/vtls/openssl.c

index 667e76a5520c5e949552d7326ae439582b89ed01..3f3dc4e347aabdd679bad1635f61cba471977204 100644 (file)
@@ -1759,7 +1759,11 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex)
   case CURL_SSLVERSION_TLSv1_1:
   case CURL_SSLVERSION_TLSv1_2:
     /* it will be handled later with the context options */
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+    req_method = TLS_client_method();
+#else
     req_method = SSLv23_client_method();
+#endif
     use_sni(TRUE);
     break;
   case CURL_SSLVERSION_SSLv2: