]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
openssl: re-match LibreSSL deinit with init
authorViktor Szakats <commit@vsz.me>
Fri, 15 Dec 2023 01:50:06 +0000 (01:50 +0000)
committerViktor Szakats <commit@vsz.me>
Fri, 15 Dec 2023 09:26:04 +0000 (09:26 +0000)
Earlier we switched to use modern initialization with LibreSSL v2.7.0
and up, but did not touch deinitialization [1]. Fix it in this patch.

Regression from bec0c5bbf34369920598678161d2df8bea0e243b #11611

[1] https://github.com/curl/curl/pull/11611#issuecomment-1668654014

Reported-by: Mike Hommey
Reviewed-by: Daniel Stenberg
Fixes #12525
Closes #12526

lib/vtls/openssl.c

index 1f735e00144a66a10dafc9cd5c1f4690d2af4bf3..737c2f7e144892c59c55dd5f800560012bde8545 100644 (file)
@@ -1753,7 +1753,7 @@ static int ossl_init(void)
 static void ossl_cleanup(void)
 {
 #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) &&  \
-  !defined(LIBRESSL_VERSION_NUMBER)
+  (!defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER >= 0x2070000fL)
   /* OpenSSL 1.1 deprecates all these cleanup functions and
      turns them into no-ops in OpenSSL 1.0 compatibility mode */
 #else