15 行
514 B
Plaintext
15 行
514 B
Plaintext
Fix build with opaque structs in LibreSSL 3.5
|
|
|
|
Index: src/lib/tls/x509_openssl.c
|
|
--- src/lib/tls/x509_openssl.c.orig
|
|
+++ 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) {
|