diff options
| author | 2025-11-04 01:13:49 +0000 | |
|---|---|---|
| committer | 2025-11-04 01:13:49 +0000 | |
| commit | ebc6f63d8f25c480b8935860c595154df01bee3e (patch) | |
| tree | 4743d23dc521210ba3e8022710b926bc1331c635 /modules/extra/ssl_openssl.cpp | |
| parent | Merge branch 'insp4' into master. (diff) | |
Avoid using deprecated functions in ssl_openssl.
Diffstat (limited to 'modules/extra/ssl_openssl.cpp')
| -rw-r--r-- | modules/extra/ssl_openssl.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/extra/ssl_openssl.cpp b/modules/extra/ssl_openssl.cpp index 38141cce8..921f2576a 100644 --- a/modules/extra/ssl_openssl.cpp +++ b/modules/extra/ssl_openssl.cpp @@ -45,6 +45,9 @@ #include "timeutils.h" #include "utility/string.h" +#define OPENSSL_API_COMPAT 30000 +#define OPENSSL_NO_DEPRECATED + #include <openssl/ssl.h> #include <openssl/err.h> #include <openssl/dh.h> @@ -548,7 +551,7 @@ private: auto* certinfo = new ssl_cert(); this->certificate = certinfo; - auto* cert = SSL_get_peer_certificate(sess); + auto* cert = SSL_get1_peer_certificate(sess); if (!cert) { certinfo->error = "Could not get peer certificate: "+std::string(get_error()); |
