Remove duplicate test from health check.
[openssl.git] / fips / fips_test_suite.c
index b7aea4e9cda1e630d1835660288bffa92288b1dc..1344b1108d100add5a763cbd643f41b180c687d7 100644 (file)
@@ -995,7 +995,11 @@ static int post_cb(int op, int id, int subid, void *ex)
        return 1;
        }
 
-int main(int argc,char **argv)
+#ifdef FIPS_ALGVS
+int fips_test_suite_main(int argc, char **argv)
+#else
+int main(int argc, char **argv)
+#endif
     {
     int bad_rsa = 0, bad_dsa = 0;
     int do_rng_stick = 0;
@@ -1088,16 +1092,16 @@ int main(int argc,char **argv)
                pass = "";
         } else {
             printf("Bad argument \"%s\"\n", argv[1]);
-            exit(1);
+            return 1;
         }
        if (!no_exit) {
                fips_algtest_init_nofips();
                if (!FIPS_module_mode_set(1, pass)) {
                    printf("Power-up self test failed\n");
-                   exit(1);
+                   return 1;
                }
                printf("Power-up self test successful\n");
-               exit(0);
+               return 0;
        }
     }
 
@@ -1116,7 +1120,7 @@ int main(int argc,char **argv)
     ERR_clear_error();
     test_msg("2. Automatic power-up self test", FIPS_module_mode_set(1, pass));
     if (!FIPS_module_mode())
-       exit(1);
+       return 1;
     if (do_drbg_stick)
             FIPS_drbg_stick();
     if (do_rng_stick)