diff options
author | Andy Polyakov <appro@openssl.org> | 2005-05-22 08:52:12 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2005-05-22 08:52:12 +0000 |
commit | 31e4ad25baea6ba8efe3cf75e89d703b3f171255 (patch) | |
tree | ada2bc2907bb45b982e47d9aa9a624b415d11701 /apps | |
parent | 225f4daf15427481d5a33fb330a46fd69e71bcf7 (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')
-rw-r--r-- | apps/speed.c | 16 |
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"); |