0003-patch-src_lib_tls_x509_openssl_c.patch 857 B

12345678910111213141516171819202122
  1. Fix build with opaque structs in LibreSSL 3.5
  2. Downloaded from OpenBSD ports:
  3. 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
  4. Patch series was sent upstream:
  5. https://forum.torproject.net/t/tor-relays-openbsd-stable-net-tor-and-0-4-7-7/3244
  6. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  7. Index: src/lib/tls/x509_openssl.c
  8. --- a/src/lib/tls/x509_openssl.c.orig
  9. +++ b/src/lib/tls/x509_openssl.c
  10. @@ -329,7 +329,7 @@ tor_tls_cert_is_valid(int severity,
  11. cert_key = X509_get_pubkey(cert->cert);
  12. if (check_rsa_1024 && cert_key) {
  13. RSA *rsa = EVP_PKEY_get1_RSA(cert_key);
  14. -#ifdef OPENSSL_1_1_API
  15. +#if defined(OPENSSL_1_1_API) || defined(LIBRESSL_VERSION_NUMBER)
  16. if (rsa && RSA_bits(rsa) == 1024) {
  17. #else
  18. if (rsa && BN_num_bits(rsa->n) == 1024) {