OPENSSL_NO_SHA512 to mask even SHA512_CTX declaration. This is done to
[openssl.git] / apps / speed.c
index 50a110df041831d126a3f131687190064d8476ca..4bec81525724705072451de63177789b40045b6e 100644 (file)
@@ -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");