]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
tls: Disable a warning with LibreSSL >= 3.8.0
authororbea <orbea@riseup.net>
Mon, 29 May 2023 19:56:37 +0000 (12:56 -0700)
committerorbea <orbea@riseup.net>
Mon, 29 May 2023 20:00:32 +0000 (13:00 -0700)
Skip a warning using EC_GFp_nist_method() which was removed in LibreSSL
3.8.

Based on a patch from OpenBSD.

https://github.com/openbsd/ports/commit/33fe251a08cb11f30ce6094a2e0759c3bb63ed16

These functions are deprecated since OpenSSL 3.0.

https://www.openssl.org/docs/man3.1/man3/EC_GFp_nist_method.html

src/lib/tls/tortls_openssl.c

index 12260c09d3f865117f8973177065f86f28e93641..c0a89ac2723fe4aba3f1cdde666136ab0deab96f 100644 (file)
@@ -340,8 +340,10 @@ tor_tls_init(void)
     SSL_load_error_strings();
 #endif /* defined(OPENSSL_1_1_API) */
 
-#if (SIZEOF_VOID_P >= 8 &&                              \
-     OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,0,1))
+#if (SIZEOF_VOID_P >= 8 &&                                \
+     OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,0,1) && \
+     (!defined(LIBRESSL_VERSION_NUMBER) ||                \
+      LIBRESSL_VERSION_NUMBER < 0x3080000fL))
     long version = tor_OpenSSL_version_num();
 
     /* LCOV_EXCL_START : we can't test these lines on the same machine */