]> granicus.if.org Git - curl/commitdiff
openssl: fix compiler warning with LibreSSL
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Sun, 22 Sep 2019 15:45:27 +0000 (17:45 +0200)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Sun, 22 Sep 2019 18:55:54 +0000 (20:55 +0200)
It was already fixed for BoringSSL in commit a0f8fccb1e0.
LibreSSL has had the second argument to SSL_CTX_set_min_proto_version
as uint16_t ever since the function was added in [0].

[0] https://github.com/libressl-portable/openbsd/commit/56f107201baefb5533486d665a58d8f57fd3aeda

Closes https://github.com/curl/curl/pull/4397

lib/vtls/openssl.c

index 0614667a9f0c6dd6b0b4335328656450e999eab0..5eeffd2d9a2be495f4753c6f102a96af46be6b1c 100644 (file)
@@ -2165,7 +2165,7 @@ 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
+#if defined(OPENSSL_IS_BORINGSSL) || defined(LIBRESSL_VERSION_NUMBER)
   uint16_t ossl_ssl_version_min = 0;
   uint16_t ossl_ssl_version_max = 0;
 #else