Merge remote-tracking branch 'origin/master'

This commit is contained in:
Yukino Song
2024-10-30 22:08:40 +08:00
3 changed files with 9 additions and 1 deletions

View File

@@ -1369,7 +1369,13 @@ namespace nvhttp {
// Verify certificates after establishing connection
https_server.verify = [](req_https_t req, SSL *ssl) {
crypto::x509_t x509 { SSL_get_peer_certificate(ssl) };
crypto::x509_t x509 {
#if OPENSSL_VERSION_MAJOR >= 3
SSL_get1_peer_certificate(ssl)
#else
SSL_get_peer_certificate(ssl)
#endif
};
if (!x509) {
BOOST_LOG(info) << "unknown -- denied"sv;
return false;