summaryrefslogtreecommitdiffstats
path: root/apps/speed.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2005-05-22 08:55:15 +0000
committerAndy Polyakov <appro@openssl.org>2005-05-22 08:55:15 +0000
commit4b235065943259fb6f110e2b07624fa7c5ae5bd0 (patch)
tree6bfe0a31ac118ba721e18075de85c00d26ef52e7 /apps/speed.c
parent82d3dda8a1c598f326779b27ea22cf073ee23aed (diff)
OPENSSL_NO_SHA512 to mask even SHA512_CTX declaration. This is done to
make no-sha512 more effective on platforms, which don't support 64-bit integer type of *any* kind.
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");