diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-09-15 23:58:49 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-09-16 08:49:51 +0200 |
commit | a0f8fccb1e06910580bc3c4e1c55ef1bd962a677 (patch) | |
tree | a070a28d83853d80c59beecb995fec9defea4208 /lib | |
parent | dda418266c99ceab368d723facb52069cbb9c8d5 (diff) |
openssl: fix warning with boringssl and SSL_CTX_set_min_proto_version
Follow-up to ffe34b7b59
Closes #4359
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vtls/openssl.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 216ed9fc5..0614667a9 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -2165,8 +2165,13 @@ set_ssl_version_min_max(SSL_CTX *ctx, struct connectdata *conn) long curl_ssl_version_max; /* convert cURL min SSL version option to OpenSSL constant */ +#ifdef OPENSSL_IS_BORINGSSL + uint16_t ossl_ssl_version_min = 0; + uint16_t ossl_ssl_version_max = 0; +#else long ossl_ssl_version_min = 0; long ossl_ssl_version_max = 0; +#endif switch(curl_ssl_version_min) { case CURL_SSLVERSION_TLSv1: /* TLS 1.x */ case CURL_SSLVERSION_TLSv1_0: @@ -2186,10 +2191,10 @@ set_ssl_version_min_max(SSL_CTX *ctx, struct connectdata *conn) } /* CURL_SSLVERSION_DEFAULT means that no option was selected. - We don't want to pass 0 to SSL_CTX_set_min_proto_version as - it would enable all versions down to the lowest supported by - the library. - So we skip this, and stay with the OS default + We don't want to pass 0 to SSL_CTX_set_min_proto_version as + it would enable all versions down to the lowest supported by + the library. + So we skip this, and stay with the OS default */ if(curl_ssl_version_min != CURL_SSLVERSION_DEFAULT) { if(!SSL_CTX_set_min_proto_version(ctx, ossl_ssl_version_min)) { |