From ccc9bbad32962f2c4cdba7942a69f8ca80507bc7 Mon Sep 17 00:00:00 2001 From: Sergey Kandaurov Date: Tue, 10 Aug 2021 23:43:16 +0300 Subject: [PATCH] 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. --- src/event/ngx_event_openssl.h | 5 +++++ 1 file changed, 5 insertions(+) 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;