summaryrefslogtreecommitdiffstats
path: root/apps/speed.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/speed.c')
-rw-r--r--apps/speed.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/apps/speed.c b/apps/speed.c
index 50a110df04..4bec815257 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -496,9 +496,13 @@ int MAIN(int argc, char **argv)
#endif
#ifndef OPENSSL_NO_SHA
unsigned char sha[SHA_DIGEST_LENGTH];
+#ifndef OPENSSL_NO_SHA256
unsigned char sha256[SHA256_DIGEST_LENGTH];
+#endif
+#ifndef OPENSSL_NO_SHA512
unsigned char sha512[SHA512_DIGEST_LENGTH];
#endif
+#endif
#ifndef OPENSSL_NO_RIPEMD
unsigned char rmd160[RIPEMD160_DIGEST_LENGTH];
#endif
@@ -878,11 +882,15 @@ int MAIN(int argc, char **argv)
doit[D_SHA256]=1,
doit[D_SHA512]=1;
else
+#ifndef OPENSSL_NO_SHA256
if (strcmp(*argv,"sha256") == 0) doit[D_SHA256]=1;
else
+#endif
+#ifndef OPENSSL_NO_SHA512
if (strcmp(*argv,"sha512") == 0) doit[D_SHA512]=1;
else
#endif
+#endif
#ifndef OPENSSL_NO_RIPEMD
if (strcmp(*argv,"ripemd") == 0) doit[D_RMD160]=1;
else
@@ -1064,8 +1072,12 @@ int MAIN(int argc, char **argv)
#endif
#ifndef OPENSSL_NO_SHA1
BIO_printf(bio_err,"sha1 ");
- BIO_printf(bio_err,"sha256 ");
- BIO_printf(bio_err,"sha512 ");
+#endif
+#ifndef OPENSSL_NO_SHA256
+ BIO_printf(bio_err,"sha256 ");
+#endif
+#ifndef OPENSSL_NO_SHA512
+ BIO_printf(bio_err,"sha512 ");
#endif
#ifndef OPENSSL_NO_RIPEMD160
BIO_printf(bio_err,"rmd160");