summaryrefslogtreecommitdiffstats
path: root/crypto/rsa
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/rsa
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/rsa')
-rw-r--r--crypto/rsa/build.info6
-rw-r--r--crypto/rsa/rsa_depr.c15
2 files changed, 10 insertions, 11 deletions
diff --git a/crypto/rsa/build.info b/crypto/rsa/build.info
index 0c9e46684c..970c493560 100644
--- a/crypto/rsa/build.info
+++ b/crypto/rsa/build.info
@@ -6,6 +6,10 @@ $COMMON=rsa_ossl.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_pk1.c \
rsa_mp_names.c
SOURCE[../../libcrypto]=$COMMON\
- rsa_saos.c rsa_err.c rsa_asn1.c rsa_depr.c rsa_ameth.c rsa_prn.c \
+ rsa_saos.c rsa_err.c rsa_asn1.c rsa_ameth.c rsa_prn.c \
rsa_pmeth.c rsa_meth.c rsa_mp.c rsa_ssl.c
+IF[{- !$disabled{'deprecated-0.9.8'} -}]
+ SOURCE[../../libcrypto]=rsa_depr.c
+ENDIF
+
SOURCE[../../providers/libfips.a]=$COMMON
diff --git a/crypto/rsa/rsa_depr.c b/crypto/rsa/rsa_depr.c
index 8ba6e8c2ee..38b445e2d2 100644
--- a/crypto/rsa/rsa_depr.c
+++ b/crypto/rsa/rsa_depr.c
@@ -19,16 +19,12 @@
#include "internal/deprecated.h"
#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/bn.h>
-# include <openssl/rsa.h>
+#include <stdio.h>
+#include <time.h>
+#include "internal/cryptlib.h"
+#include <openssl/bn.h>
+#include <openssl/rsa.h>
RSA *RSA_generate_key(int bits, unsigned long e_value,
void (*callback) (int, int, void *), void *cb_arg)
@@ -64,4 +60,3 @@ RSA *RSA_generate_key(int bits, unsigned long e_value,
BN_GENCB_free(cb);
return 0;
}
-#endif