summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2021-08-10 23:43:16 +0300
committerSergey Kandaurov <pluknet@nginx.com>2021-08-10 23:43:16 +0300
commit38bb7cc7013f0f7f5a77208f34d4eef27c503fc6 (patch)
treebcd8c91a24ce0cf399bf406e3c8e51d58402d7b2 /src
parentb167b27eb2da6a52c2dce2553b84537c29efec75 (diff)
downloadnginx-38bb7cc7013f0f7f5a77208f34d4eef27c503fc6.tar.gz
nginx-38bb7cc7013f0f7f5a77208f34d4eef27c503fc6.tar.bz2
SSL: SSL_get_peer_certificate() is deprecated in OpenSSL 3.0.
Switch to SSL_get1_peer_certificate() when building with OpenSSL 3.0 and OPENSSL_NO_DEPRECATED defined.
Diffstat (limited to 'src')
-rw-r--r--src/event/ngx_event_openssl.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/event/ngx_event_openssl.h b/src/event/ngx_event_openssl.h
index 7fb4c5f8c..a70b86221 100644
--- a/src/event/ngx_event_openssl.h
+++ b/src/event/ngx_event_openssl.h
@@ -64,6 +64,11 @@
#endif
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L && !defined SSL_get_peer_certificate)
+#define SSL_get_peer_certificate(s) SSL_get1_peer_certificate(s)
+#endif
+
+
typedef struct ngx_ssl_ocsp_s ngx_ssl_ocsp_t;