mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 14:29:10 -07:00
Fix #1442
This commit is contained in:
parent
9f512acb42
commit
c8c1c3d376
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue