1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-10 07:04:03 +00:00

security/tor: Fix build with libressl 3.5

Differential Revision:	https://reviews.freebsd.org/D37054
This commit is contained in:
Felix Palmen 2022-10-29 08:01:58 -07:00 committed by Yuri Victorovich
parent b92dcd07c7
commit 8e5a867d73
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,19 @@
--- src/lib/crypt_ops/compat_openssl.h.orig 2022-10-17 12:38:04 UTC
+++ src/lib/crypt_ops/compat_openssl.h
@@ -25,14 +25,13 @@
#error "We require OpenSSL >= 1.0.1"
#endif
-#if OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,0) && \
- ! defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,0)
/* We define this macro if we're trying to build with the majorly refactored
* API in OpenSSL 1.1 */
#define OPENSSL_1_1_API
#endif /* OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,0) && ... */
-#ifndef OPENSSL_1_1_API
+#if !defined(OPENSSL_1_1_API) || defined(LIBRESSL_VERSION_NUMBER)
#define OpenSSL_version(v) SSLeay_version(v)
#define tor_OpenSSL_version_num() SSLeay()
#define RAND_OpenSSL() RAND_SSLeay()

View File

@ -0,0 +1,12 @@
--- src/lib/crypt_ops/crypto_openssl_mgt.h.orig 2022-10-17 12:37:26 UTC
+++ src/lib/crypt_ops/crypto_openssl_mgt.h
@@ -54,8 +54,7 @@
#define DISABLE_ENGINES
#endif
-#if OPENSSL_VERSION_NUMBER >= OPENSSL_VER(1,1,0,0,5) && \
- !defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER >= OPENSSL_VER(1,1,0,0,5)
/* OpenSSL as of 1.1.0pre4 has an "new" thread API, which doesn't require
* setting up various callbacks.
*