diff options
author | Matt Caswell <matt@openssl.org> | 2016-03-18 17:43:58 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-03-21 14:28:56 +0000 |
commit | 83ae8124de62f5f6d07dd4b0e6043c8a196b789e (patch) | |
tree | fbd294de40aaad6af48c1755918fa505a39e99d4 /apps | |
parent | b75ac3c2a3ae8549eb8afb701c1fc7a55c2afdb5 (diff) |
Fix no-dsa
Misc fixes for no-dsa.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dhparam.c | 7 | ||||
-rw-r--r-- | apps/rsa.c | 7 | ||||
-rw-r--r-- | apps/speed.c | 17 |
3 files changed, 24 insertions, 7 deletions
diff --git a/apps/dhparam.c b/apps/dhparam.c index f7fd8c0c35..58baff822a 100644 --- a/apps/dhparam.c +++ b/apps/dhparam.c @@ -171,7 +171,10 @@ int dhparam_main(int argc, char **argv) BIO *in = NULL, *out = NULL; DH *dh = NULL; char *infile = NULL, *outfile = NULL, *prog, *inrand = NULL; - int dsaparam = 0, i, text = 0, C = 0, ret = 1, num = 0, g = 0; +#ifndef OPENSSL_NO_DSA + int dsaparam = 0; +#endif + int i, text = 0, C = 0, ret = 1, num = 0, g = 0; int informat = FORMAT_PEM, outformat = FORMAT_PEM, check = 0, noout = 0; OPTION_CHOICE o; @@ -211,7 +214,9 @@ int dhparam_main(int argc, char **argv) text = 1; break; case OPT_DSAPARAM: +#ifndef OPENSSL_NO_DSA dsaparam = 1; +#endif break; case OPT_C: C = 1; diff --git a/apps/rsa.c b/apps/rsa.c index 5320f38455..38cedf7b77 100644 --- a/apps/rsa.c +++ b/apps/rsa.c @@ -167,7 +167,10 @@ int rsa_main(int argc, char **argv) char *passin = NULL, *passout = NULL, *passinarg = NULL, *passoutarg = NULL; int i, private = 0; int informat = FORMAT_PEM, outformat = FORMAT_PEM, text = 0, check = 0; - int noout = 0, modulus = 0, pubin = 0, pubout = 0, pvk_encr = 2, ret = 1; + int noout = 0, modulus = 0, pubin = 0, pubout = 0, ret = 1; +# if !defined(OPENSSL_NO_DSA) && !defined(OPENSSL_NO_RC4) + int pvk_encr = 2; +#endif OPTION_CHOICE o; prog = opt_init(argc, argv, rsa_options); @@ -217,7 +220,7 @@ int rsa_main(int argc, char **argv) case OPT_RSAPUBKEY_OUT: pubout = 2; break; -#ifndef OPENSSL_NO_RC4 +# if !defined(OPENSSL_NO_DSA) && !defined(OPENSSL_NO_RC4) case OPT_PVK_STRONG: pvk_encr = 2; break; diff --git a/apps/speed.c b/apps/speed.c index 260b55fccc..409f3a98e2 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -547,15 +547,17 @@ static OPT_PAIR doit_choices[] = { {NULL} }; -#define R_DSA_512 0 -#define R_DSA_1024 1 -#define R_DSA_2048 2 +#ifndef OPENSSL_NO_DSA +# define R_DSA_512 0 +# define R_DSA_1024 1 +# define R_DSA_2048 2 static OPT_PAIR dsa_choices[] = { {"dsa512", R_DSA_512}, {"dsa1024", R_DSA_1024}, {"dsa2048", R_DSA_2048}, {NULL}, }; +#endif #define R_RSA_512 0 #define R_RSA_1024 1 @@ -1247,7 +1249,10 @@ int speed_main(int argc, char **argv) double d = 0.0; OPTION_CHOICE o; int multiblock = 0, doit[ALGOR_NUM], pr_header = 0; - int dsa_doit[DSA_NUM], rsa_doit[RSA_NUM]; +#ifndef OPENSSL_NO_DSA + int dsa_doit[DSA_NUM]; +#endif + int rsa_doit[RSA_NUM]; int ret = 1, i, k, misalign = 0; long c[ALGOR_NUM][SIZE_NUM], count = 0, save_count = 0; #ifndef NO_FORK @@ -1395,8 +1400,10 @@ int speed_main(int argc, char **argv) doit[i] = 0; for (i = 0; i < RSA_NUM; i++) rsa_doit[i] = 0; +#ifndef OPENSSL_NO_DSA for (i = 0; i < DSA_NUM; i++) dsa_doit[i] = 0; +#endif #ifndef OPENSSL_NO_EC for (i = 0; i < EC_NUM; i++) ecdsa_doit[i] = 0; @@ -1612,8 +1619,10 @@ int speed_main(int argc, char **argv) doit[i] = 1; for (i = 0; i < RSA_NUM; i++) rsa_doit[i] = 1; +#ifndef OPENSSL_NO_DSA for (i = 0; i < DSA_NUM; i++) dsa_doit[i] = 1; +#endif #ifndef OPENSSL_NO_EC for (i = 0; i < EC_NUM; i++) ecdsa_doit[i] = 1; |