23e1e04d54
Fixes: http://autobuild.buildroot.net/results/71e/71e03ee8f6e6e5a235556b85a360cbad23a22897/ http://autobuild.buildroot.net/results/4a9/4a93bea0b83eca133ace3e3cfd2b5cb60b691d6e/ http://autobuild.buildroot.net/results/6b8/6b8ab9c5253586426b33d2cba20e7f9f992dbee9/ http://autobuild.buildroot.net/results/8a9/8a9c19878c2d599de6aa3bb3a849b1701f50a829/ and many others Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
23 lines
857 B
Diff
23 lines
857 B
Diff
Fix build with opaque structs in LibreSSL 3.5
|
|
|
|
Downloaded from OpenBSD ports:
|
|
http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/net/tor/patches/patch-src_lib_tls_x509_openssl_c?rev=1.2&content-type=text/x-cvsweb-markup
|
|
|
|
Patch series was sent upstream:
|
|
https://forum.torproject.net/t/tor-relays-openbsd-stable-net-tor-and-0-4-7-7/3244
|
|
|
|
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
|
|
|
Index: src/lib/tls/x509_openssl.c
|
|
--- a/src/lib/tls/x509_openssl.c.orig
|
|
+++ b/src/lib/tls/x509_openssl.c
|
|
@@ -329,7 +329,7 @@ tor_tls_cert_is_valid(int severity,
|
|
cert_key = X509_get_pubkey(cert->cert);
|
|
if (check_rsa_1024 && cert_key) {
|
|
RSA *rsa = EVP_PKEY_get1_RSA(cert_key);
|
|
-#ifdef OPENSSL_1_1_API
|
|
+#if defined(OPENSSL_1_1_API) || defined(LIBRESSL_VERSION_NUMBER)
|
|
if (rsa && RSA_bits(rsa) == 1024) {
|
|
#else
|
|
if (rsa && BN_num_bits(rsa->n) == 1024) {
|