[nginx] SSL: SSL_get_peer_certificate() is deprecated in OpenSSL 3.0.

Sergey Kandaurov pluknet at nginx.com
Tue Aug 10 21:46:27 UTC 2021


details:   https://hg.nginx.org/nginx/rev/8ebda26e4f98
branches:  
changeset: 7895:8ebda26e4f98
user:      Sergey Kandaurov <pluknet at nginx.com>
date:      Tue Aug 10 23:43:16 2021 +0300
description:
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:

 src/event/ngx_event_openssl.h |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r 37be19a3c0ee -r 8ebda26e4f98 src/event/ngx_event_openssl.h
--- a/src/event/ngx_event_openssl.h	Tue Aug 10 23:42:59 2021 +0300
+++ b/src/event/ngx_event_openssl.h	Tue Aug 10 23:43:16 2021 +0300
@@ -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;
 
 


More information about the nginx-devel mailing list