[nginx] SSL: silenced warnings when building with OpenSSL 3.0.

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


details:   https://hg.nginx.org/nginx/rev/8f7107617550
branches:  
changeset: 7898:8f7107617550
user:      Sergey Kandaurov <pluknet at nginx.com>
date:      Tue Aug 10 23:43:16 2021 +0300
description:
SSL: silenced warnings when building with OpenSSL 3.0.

The OPENSSL_SUPPRESS_DEPRECATED macro is used to suppress deprecation warnings.
This covers Session Tickets keys, SSL Engine, DH low level API for DHE ciphers.

Unlike OPENSSL_API_COMPAT, it works well with OpenSSL built with no-deprecated.
In particular, it doesn't unhide various macros in OpenSSL includes, which are
meant to be hidden under OPENSSL_NO_DEPRECATED.

diffstat:

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

diffs (12 lines):

diff -r 4195a6f0c61c -r 8f7107617550 src/event/ngx_event_openssl.h
--- a/src/event/ngx_event_openssl.h	Tue Aug 10 23:43:16 2021 +0300
+++ b/src/event/ngx_event_openssl.h	Tue Aug 10 23:43:16 2021 +0300
@@ -12,6 +12,8 @@
 #include <ngx_config.h>
 #include <ngx_core.h>
 
+#define OPENSSL_SUPPRESS_DEPRECATED
+
 #include <openssl/ssl.h>
 #include <openssl/err.h>
 #include <openssl/bn.h>


More information about the nginx-devel mailing list