sha1-s390x.pl: lingering comment update.
[openssl.git] / crypto / sha / sha256t.c
index 20580fa..e1d3428 100644 (file)
 #include <openssl/sha.h>
 #include <openssl/evp.h>
 
+#if defined(OPENSSL_NO_SHA) || defined(OPENSSL_NO_SHA256)
+int main(int argc, char *argv[])
+{
+    printf("No SHA256 support\n");
+    return(0);
+}
+#else
+
 unsigned char app_b1[SHA256_DIGEST_LENGTH] = {
        0xba,0x78,0x16,0xbf,0x8f,0x01,0xcf,0xea,
        0x41,0x41,0x40,0xde,0x5d,0xae,0x22,0x23,
@@ -46,7 +54,7 @@ unsigned char addenum_3[SHA224_DIGEST_LENGTH] = {
        0xf0,0x3f,0x42,0x58,0x19,0x48,0xb2,0xee,
        0x4e,0xe7,0xad,0x67 };
 
-int main ()
+int main (int argc,char **argv)
 { unsigned char md[SHA256_DIGEST_LENGTH];
   int          i;
   EVP_MD_CTX   evp;
@@ -74,10 +82,17 @@ int main ()
 
     EVP_MD_CTX_init (&evp);
     EVP_DigestInit_ex (&evp,EVP_sha256(),NULL);
-    for (i=0;i<1000000;i+=64)
+    for (i=0;i<1000000;i+=288)
        EVP_DigestUpdate (&evp, "aaaaaaaa""aaaaaaaa""aaaaaaaa""aaaaaaaa"
+                               "aaaaaaaa""aaaaaaaa""aaaaaaaa""aaaaaaaa"
+                               "aaaaaaaa""aaaaaaaa""aaaaaaaa""aaaaaaaa"
+                               "aaaaaaaa""aaaaaaaa""aaaaaaaa""aaaaaaaa"
+                               "aaaaaaaa""aaaaaaaa""aaaaaaaa""aaaaaaaa"
+                               "aaaaaaaa""aaaaaaaa""aaaaaaaa""aaaaaaaa"
+                               "aaaaaaaa""aaaaaaaa""aaaaaaaa""aaaaaaaa"
+                               "aaaaaaaa""aaaaaaaa""aaaaaaaa""aaaaaaaa"
                                "aaaaaaaa""aaaaaaaa""aaaaaaaa""aaaaaaaa",
-                               (1000000-i)<64?1000000-i:64);
+                               (1000000-i)<288?1000000-i:288);
     EVP_DigestFinal_ex (&evp,md,NULL);
     EVP_MD_CTX_cleanup (&evp);
 
@@ -133,3 +148,4 @@ int main ()
 
   return 0;
 }
+#endif