diff options
author | Rich Salz <rsalz@akamai.com> | 2020-03-05 12:50:31 -0500 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-04-16 13:52:22 +0200 |
commit | 705536e2b5c4167dbda2e0046d83f9e0f4a65514 (patch) | |
tree | 5b76e00908f3d8c5dcbb75f094a4c06d989e97d5 /crypto/dh | |
parent | 7165593ce5a07a6860d4d408ad640ee707172936 (diff) |
Use build.info, not ifdef for crypto modules
Don't wrap conditionally-compiled files in global ifndef tests.
Instead, test if the feature is disabled and, if so, do not
compile it.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11263)
Diffstat (limited to 'crypto/dh')
-rw-r--r-- | crypto/dh/build.info | 5 | ||||
-rw-r--r-- | crypto/dh/dh_depr.c | 12 |
2 files changed, 8 insertions, 9 deletions
diff --git a/crypto/dh/build.info b/crypto/dh/build.info index f4498f4d2b..656e6ea828 100644 --- a/crypto/dh/build.info +++ b/crypto/dh/build.info @@ -3,7 +3,10 @@ LIBS=../../libcrypto $COMMON=dh_lib.c dh_key.c dh_group_params.c dh_check.c dh_backend.c dh_gen.c SOURCE[../../libcrypto]=$COMMON\ - dh_asn1.c dh_err.c dh_depr.c \ + dh_asn1.c dh_err.c \ dh_ameth.c dh_pmeth.c dh_prn.c dh_rfc5114.c dh_kdf.c dh_meth.c +IF[{- !$disabled{'deprecated-0.9.8'} -}] + SOURCE[../../libcrypto]=dh_depr.c +ENDIF SOURCE[../../providers/libfips.a]=$COMMON diff --git a/crypto/dh/dh_depr.c b/crypto/dh/dh_depr.c index 33689d8e1c..0d21d97269 100644 --- a/crypto/dh/dh_depr.c +++ b/crypto/dh/dh_depr.c @@ -16,14 +16,11 @@ #include "internal/deprecated.h" #include <openssl/opensslconf.h> -#ifdef OPENSSL_NO_DEPRECATED_0_9_8 -NON_EMPTY_TRANSLATION_UNIT -#else -# include <stdio.h> -# include "internal/cryptlib.h" -# include <openssl/bn.h> -# include <openssl/dh.h> +#include <stdio.h> +#include "internal/cryptlib.h" +#include <openssl/bn.h> +#include <openssl/dh.h> DH *DH_generate_parameters(int prime_len, int generator, void (*callback) (int, int, void *), void *cb_arg) @@ -49,4 +46,3 @@ DH *DH_generate_parameters(int prime_len, int generator, DH_free(ret); return NULL; } -#endif |