summaryrefslogtreecommitdiffstats
path: root/crypto/dsa
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2020-03-05 12:50:31 -0500
committerRichard Levitte <levitte@openssl.org>2020-04-16 13:52:22 +0200
commit705536e2b5c4167dbda2e0046d83f9e0f4a65514 (patch)
tree5b76e00908f3d8c5dcbb75f094a4c06d989e97d5 /crypto/dsa
parent7165593ce5a07a6860d4d408ad640ee707172936 (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/dsa')
-rw-r--r--crypto/dsa/build.info6
-rw-r--r--crypto/dsa/dsa_depr.c18
2 files changed, 11 insertions, 13 deletions
diff --git a/crypto/dsa/build.info b/crypto/dsa/build.info
index 7f621cb56b..9a7d275c35 100644
--- a/crypto/dsa/build.info
+++ b/crypto/dsa/build.info
@@ -4,7 +4,9 @@ $COMMON=dsa_sign.c dsa_vrf.c dsa_lib.c dsa_ossl.c dsa_check.c \
dsa_key.c dsa_backend.c dsa_gen.c
SOURCE[../../libcrypto]=$COMMON\
- dsa_asn1.c \
- dsa_err.c dsa_depr.c dsa_ameth.c dsa_pmeth.c dsa_prn.c \
+ dsa_asn1.c dsa_err.c dsa_ameth.c dsa_pmeth.c dsa_prn.c \
dsa_meth.c
+IF[{- !$disabled{'deprecated-0.9.8'} -}]
+ SOURCE[../../libcrypto]=dsa_depr.c
+ENDIF
SOURCE[../../providers/libfips.a]=$COMMON
diff --git a/crypto/dsa/dsa_depr.c b/crypto/dsa/dsa_depr.c
index 5c8f9af2b9..93f5ad41e3 100644
--- a/crypto/dsa/dsa_depr.c
+++ b/crypto/dsa/dsa_depr.c
@@ -26,17 +26,14 @@
#define xxxHASH EVP_sha1()
#include <openssl/opensslconf.h>
-#ifdef OPENSSL_NO_DEPRECATED_0_9_8
-NON_EMPTY_TRANSLATION_UNIT
-#else
-# include <stdio.h>
-# include <time.h>
-# include "internal/cryptlib.h"
-# include <openssl/evp.h>
-# include <openssl/bn.h>
-# include <openssl/dsa.h>
-# include <openssl/sha.h>
+#include <stdio.h>
+#include <time.h>
+#include "internal/cryptlib.h"
+#include <openssl/evp.h>
+#include <openssl/bn.h>
+#include <openssl/dsa.h>
+#include <openssl/sha.h>
DSA *DSA_generate_parameters(int bits,
unsigned char *seed_in, int seed_len,
@@ -65,4 +62,3 @@ err:
DSA_free(ret);
return NULL;
}
-#endif