diff '--color=auto' -urN cpp-httplib-0.16.2.orig/httplib.h cpp-httplib-0.16.2/httplib.h --- cpp-httplib-0.16.2.orig/httplib.h 2024-08-09 19:05:55.831889663 +0200 +++ cpp-httplib-0.16.2/httplib.h 2024-08-09 19:08:48.730886021 +0200 @@ -274,7 +274,7 @@ #error Please use OpenSSL or a current version of BoringSSL #endif #define SSL_get1_peer_certificate SSL_get_peer_certificate -#elif OPENSSL_VERSION_NUMBER < 0x30000000L +#elif OPENSSL_VERSION_NUMBER < 0x30000000L && !defined(LIBRESSL_VERSION_NUMBER) #error Sorry, OpenSSL versions prior to 3.0.0 are not supported #endif @@ -732,7 +732,7 @@ fn(); } -#if defined(CPPHTTPLIB_OPENSSL_SUPPORT) && !defined(OPENSSL_IS_BORINGSSL) +#if defined(CPPHTTPLIB_OPENSSL_SUPPORT) && !defined(OPENSSL_IS_BORINGSSL) && !defined(LIBRESSL_VERSION_NUMBER) OPENSSL_thread_stop(); #endif } @@ -9108,7 +9108,7 @@ return false; } - auto server_cert = SSL_get1_peer_certificate(ssl2); + auto server_cert = SSL_get_peer_certificate(ssl2); if (server_cert == nullptr) { error = Error::SSLServerVerification;