Update ECDSA selftest to use hard coded private keys. Include tests for
[openssl.git] / fips / fips_test_suite.c
index 6addef6386649108e5949a307fdad89a603c9ef3..2cfd5ef9308c6a0461beb54f5625c50f87eed5c1 100644 (file)
@@ -671,15 +671,13 @@ int main(int argc,char **argv)
     int do_corrupt_rsa_keygen = 0, do_corrupt_dsa_keygen = 0;
     int bad_rsa = 0, bad_dsa = 0;
     int do_rng_stick = 0;
+    int do_drbg_stick = 0;
     int no_exit = 0;
 
     fips_algtest_init_nofips();
 
     printf("\tFIPS-mode test application\n\n");
 
-    /* Load entropy from external file, if any */
-    RAND_load_file(".rnd", 1024);
-
     if (argv[1]) {
         /* Corrupted KAT tests */
         if (!strcmp(argv[1], "aes")) {
@@ -722,11 +720,15 @@ int main(int argc,char **argv)
        } else if (!strcmp(argv[1], "drbg")) {
            FIPS_corrupt_drbg();
        } else if (!strcmp(argv[1], "rng")) {
-           FIPS_corrupt_rng();
+           FIPS_corrupt_x931();
        } else if (!strcmp(argv[1], "rngstick")) {
            do_rng_stick = 1;
            no_exit = 1;
            printf("RNG test with stuck continuous test...\n");
+       } else if (!strcmp(argv[1], "drbgstick")) {
+           do_drbg_stick = 1;
+           no_exit = 1;
+           printf("DRBG test with stuck continuous test...\n");
         } else {
             printf("Bad argument \"%s\"\n", argv[1]);
             exit(1);
@@ -756,8 +758,10 @@ int main(int argc,char **argv)
             FIPS_corrupt_dsa_keygen();
     if (do_corrupt_rsa_keygen)
             FIPS_corrupt_rsa_keygen();
+    if (do_drbg_stick)
+            FIPS_drbg_stick();
     if (do_rng_stick)
-            FIPS_rng_stick();
+            FIPS_x931_stick();
 
     /* AES encryption/decryption
     */