From 162f1e08f8ed4828d5af072590e7c1aeb08783d5 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Tue, 2 Feb 2010 14:03:07 +0000 Subject: [PATCH] make no-rsa no-dsa compile again --- apps/dsa.c | 2 +- apps/dsaparam.c | 6 ++++++ apps/gendsa.c | 6 ++++++ apps/speed.c | 4 ++++ fips/dsa/fips_dsatest.c | 2 +- fips/fips_test_suite.c | 7 ++++--- fips/rsa/fips_rsagtest.c | 2 +- fips/rsa/fips_rsastest.c | 2 +- fips/rsa/fips_rsavtest.c | 3 ++- 9 files changed, 26 insertions(+), 8 deletions(-) diff --git a/apps/dsa.c b/apps/dsa.c index cbc1fe3f81..5e68a56cfd 100644 --- a/apps/dsa.c +++ b/apps/dsa.c @@ -65,11 +65,11 @@ #include "apps.h" #include #include -#include #include #include #include #include +#include #undef PROG #define PROG dsa_main diff --git a/apps/dsaparam.c b/apps/dsaparam.c index c301e81af1..4305a739b3 100644 --- a/apps/dsaparam.c +++ b/apps/dsaparam.c @@ -475,4 +475,10 @@ static int MS_CALLBACK dsa_cb(int p, int n, BN_GENCB *cb) #endif return 1; } +#else /* !OPENSSL_NO_DSA */ + +# if PEDANTIC +static void *dummy=&dummy; +# endif + #endif diff --git a/apps/gendsa.c b/apps/gendsa.c index 8a296c66e5..22c39629e5 100644 --- a/apps/gendsa.c +++ b/apps/gendsa.c @@ -279,4 +279,10 @@ end: apps_shutdown(); OPENSSL_EXIT(ret); } +#else /* !OPENSSL_NO_DSA */ + +# if PEDANTIC +static void *dummy=&dummy; +# endif + #endif diff --git a/apps/speed.c b/apps/speed.c index 078e6faae6..07f0ae04a6 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -297,8 +297,12 @@ static const char *names[ALGOR_NUM]={ "aes-128 ige","aes-192 ige","aes-256 ige"}; static double results[ALGOR_NUM][SIZE_NUM]; static int lengths[SIZE_NUM]={16,64,256,1024,8*1024}; +#ifndef OPENSSL_NO_RSA static double rsa_results[RSA_NUM][2]; +#endif +#ifndef OPENSSL_NO_DSA static double dsa_results[DSA_NUM][2]; +#endif #ifndef OPENSSL_NO_ECDSA static double ecdsa_results[EC_NUM][2]; #endif diff --git a/fips/dsa/fips_dsatest.c b/fips/dsa/fips_dsatest.c index c7e0f5164f..1aec089ae1 100644 --- a/fips/dsa/fips_dsatest.c +++ b/fips/dsa/fips_dsatest.c @@ -69,7 +69,6 @@ #include #include #include -#include #include #ifndef OPENSSL_NO_ENGINE #include @@ -83,6 +82,7 @@ int main(int argc, char *argv[]) return(0); } #else +#include #include #include #include diff --git a/fips/fips_test_suite.c b/fips/fips_test_suite.c index 41c9344bd6..2bc0ba9080 100644 --- a/fips/fips_test_suite.c +++ b/fips/fips_test_suite.c @@ -18,9 +18,6 @@ #include #include #include -#include -#include -#include #include #include @@ -37,6 +34,10 @@ int main(int argc, char *argv[]) } #else +#include +#include +#include + #include #include "fips_utl.h" diff --git a/fips/rsa/fips_rsagtest.c b/fips/rsa/fips_rsagtest.c index 33a3d7a48c..657e1b6975 100644 --- a/fips/rsa/fips_rsagtest.c +++ b/fips/rsa/fips_rsagtest.c @@ -63,7 +63,6 @@ #include #include #include -#include #include #include @@ -77,6 +76,7 @@ int main(int argc, char *argv[]) #else +#include #include "fips_utl.h" int rsa_test(FILE *out, FILE *in); diff --git a/fips/rsa/fips_rsastest.c b/fips/rsa/fips_rsastest.c index 16c174a2f8..452084ff9f 100644 --- a/fips/rsa/fips_rsastest.c +++ b/fips/rsa/fips_rsastest.c @@ -63,7 +63,6 @@ #include #include #include -#include #include #include @@ -77,6 +76,7 @@ int main(int argc, char *argv[]) #else +#include #include "fips_utl.h" static int rsa_stest(FILE *out, FILE *in, int Saltlen); diff --git a/fips/rsa/fips_rsavtest.c b/fips/rsa/fips_rsavtest.c index 6340f190a3..aadab27536 100644 --- a/fips/rsa/fips_rsavtest.c +++ b/fips/rsa/fips_rsavtest.c @@ -65,7 +65,6 @@ #include #include #include -#include #ifndef OPENSSL_FIPS @@ -77,6 +76,8 @@ int main(int argc, char *argv[]) #else +#include + #include "fips_utl.h" int rsa_test(FILE *out, FILE *in, int saltlen); -- 2.25.1