]> git.kaiwu.me - nginx.git/commitdiff
SSL: silenced warnings when building with OpenSSL 3.0.
authorSergey Kandaurov <pluknet@nginx.com>
Tue, 10 Aug 2021 20:43:16 +0000 (23:43 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Tue, 10 Aug 2021 20:43:16 +0000 (23:43 +0300)
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.

src/event/ngx_event_openssl.h

index a54a86a4effa8f5fbe6384e34c9c4fa3ba89d478..81b87d7cbafbc67fc21146d6b124db938bd088dd 100644 (file)
@@ -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>