This commit is contained in:
yhirose 2022-12-01 13:38:58 -05:00
parent 9f512acb42
commit c8c1c3d376

View file

@ -255,6 +255,8 @@ using socket_t = int;
#if OPENSSL_VERSION_NUMBER < 0x1010100fL
#error Sorry, OpenSSL versions prior to 1.1.1 are not supported
#elif OPENSSL_VERSION_NUMBER < 0x30000000L
#define SSL_get1_peer_certificate SSL_get_peer_certificate
#endif
#endif
@ -7716,7 +7718,7 @@ inline bool SSLClient::initialize_ssl(Socket &socket, Error &error) {
return false;
}
auto server_cert = SSL_get_peer_certificate(ssl2);
auto server_cert = SSL_get1_peer_certificate(ssl2);
if (server_cert == nullptr) {
error = Error::SSLServerVerification;