diff --git a/security/tor/files/patch-src_lib_crypt__ops_compat__openssl.h b/security/tor/files/patch-src_lib_crypt__ops_compat__openssl.h new file mode 100644 --- /dev/null +++ b/security/tor/files/patch-src_lib_crypt__ops_compat__openssl.h @@ -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() diff --git a/security/tor/files/patch-src_lib_crypt__ops_crypto__openssl__mgt.h b/security/tor/files/patch-src_lib_crypt__ops_crypto__openssl__mgt.h new file mode 100644 --- /dev/null +++ b/security/tor/files/patch-src_lib_crypt__ops_crypto__openssl__mgt.h @@ -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. + *