mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-10 01:33:53 +00:00
Fix #1442
This commit is contained in:
parent
9f512acb42
commit
c8c1c3d376
@ -255,6 +255,8 @@ using socket_t = int;
|
|||||||
|
|
||||||
#if OPENSSL_VERSION_NUMBER < 0x1010100fL
|
#if OPENSSL_VERSION_NUMBER < 0x1010100fL
|
||||||
#error Sorry, OpenSSL versions prior to 1.1.1 are not supported
|
#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
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -7716,7 +7718,7 @@ inline bool SSLClient::initialize_ssl(Socket &socket, Error &error) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto server_cert = SSL_get_peer_certificate(ssl2);
|
auto server_cert = SSL_get1_peer_certificate(ssl2);
|
||||||
|
|
||||||
if (server_cert == nullptr) {
|
if (server_cert == nullptr) {
|
||||||
error = Error::SSLServerVerification;
|
error = Error::SSLServerVerification;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user