summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Palmen <zirias@FreeBSD.org>2022-10-29 08:01:58 -0700
committerYuri Victorovich <yuri@FreeBSD.org>2022-10-29 08:02:59 -0700
commit8e5a867d733f837a27ea72e0dae1e01f9bb524fd (patch)
treeff733db5d12edd0fe79def860b90bf14c759d56d
parentwww/chromium: unbreak WebAuthn USB FIDO support by implementing a fake USB se... (diff)
security/tor: Fix build with libressl 3.5
Differential Revision: https://reviews.freebsd.org/D37054
-rw-r--r--security/tor/files/patch-src_lib_crypt__ops_compat__openssl.h19
-rw-r--r--security/tor/files/patch-src_lib_crypt__ops_crypto__openssl__mgt.h12
2 files changed, 31 insertions, 0 deletions
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
index 000000000000..fae008ba2224
--- /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
index 000000000000..153ef20eb890
--- /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.
+ *