From 46994f71631922565924e3ca6303950c36337b33 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Wed, 11 Dec 2019 14:36:36 +0100 Subject: Add better support for using deprecated symbols internally OPENSSL_SUPPRESS_DEPRECATED only does half the job, in telling the deprecation macros not to add the warning attribute. However, with 'no-deprecated', the symbols are still removed entirely, while we might still want to use them internally. The solution is to permit macros to be modified internally, such as undefining OPENSSL_NO_DEPRECATED in this case. However, with the way includes , that's easier said than done. That's solved by generating instead, and add a new that includes as well as , thus allowing to replace an inclusion of with this: #include #undef OPENSSL_NO_DEPRECATED #define OPENSSL_SUPPRESS_DEPRECATED #include Or simply add the following prior to any other openssl inclusion: #include #undef OPENSSL_NO_DEPRECATED #define OPENSSL_SUPPRESS_DEPRECATED Note that undefining OPENSSL_NO_DEPRECATED must never be done by applications, since the symbols must still be exported by the library. Internal test programs are excempt of this rule, though. Reviewed-by: Tim Hudson Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/10608) --- build.info | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build.info') diff --git a/build.info b/build.info index a28ddbe739..6cfa2017c4 100644 --- a/build.info +++ b/build.info @@ -9,11 +9,11 @@ DEPEND[libssl]=libcrypto # Empty DEPEND "indices" means the dependencies are expected to be built # unconditionally before anything else. -DEPEND[]=include/openssl/opensslconf.h include/openssl/opensslv.h \ +DEPEND[]=include/openssl/configuration.h include/openssl/opensslv.h \ include/crypto/bn_conf.h include/crypto/dso_conf.h \ doc/man7/openssl_user_macros.pod -GENERATE[include/openssl/opensslconf.h]=include/openssl/opensslconf.h.in +GENERATE[include/openssl/configuration.h]=include/openssl/configuration.h.in GENERATE[include/openssl/opensslv.h]=include/openssl/opensslv.h.in GENERATE[include/crypto/bn_conf.h]=include/crypto/bn_conf.h.in GENERATE[include/crypto/dso_conf.h]=include/crypto/dso_conf.h.in -- cgit v1.2.3