diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-03-25 16:36:46 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-03-25 16:36:46 +0000 |
commit | cd22dfbf0109ae42f650c0d0b1d0e956fe9a1574 (patch) | |
tree | a3f3ca931c8dfd6b86d5e5666a6c35575817ca1e /fips/rand | |
parent | d4178c8fb1736354d16a6e1b82c5e02433973374 (diff) |
Have all algorithm test programs call fips_algtest_init() at startup:
this will perform all standalone operations such as setting error
callbacks, entering FIPS mode etc.
Diffstat (limited to 'fips/rand')
-rw-r--r-- | fips/rand/fips_drbgvs.c | 2 | ||||
-rw-r--r-- | fips/rand/fips_randtest.c | 2 | ||||
-rw-r--r-- | fips/rand/fips_rngvs.c | 4 |
3 files changed, 3 insertions, 5 deletions
diff --git a/fips/rand/fips_drbgvs.c b/fips/rand/fips_drbgvs.c index 53d4439342..d3b47a0954 100644 --- a/fips/rand/fips_drbgvs.c +++ b/fips/rand/fips_drbgvs.c @@ -172,7 +172,7 @@ int main(int argc,char **argv) int gen = 0; - fips_set_error_print(); + fips_algtest_init(); if (argc == 3) { diff --git a/fips/rand/fips_randtest.c b/fips/rand/fips_randtest.c index b211a039c0..3465bc3029 100644 --- a/fips/rand/fips_randtest.c +++ b/fips/rand/fips_randtest.c @@ -241,7 +241,7 @@ static void run_test(unsigned char *key, int keylen, AES_PRNG_MCT *tv) int main() { - fips_set_error_print(); + fips_algtest_init(); run_test(aes_128_mct_key, 16, &aes_128_mct_tv); printf("FIPS PRNG test 1 done\n"); run_test(aes_192_mct_key, 24, &aes_192_mct_tv); diff --git a/fips/rand/fips_rngvs.c b/fips/rand/fips_rngvs.c index 786f5420b4..f858b6d2e9 100644 --- a/fips/rand/fips_rngvs.c +++ b/fips/rand/fips_rngvs.c @@ -226,9 +226,7 @@ int main(int argc,char **argv) fprintf(stderr,"%s [mct|vst]\n",argv[0]); exit(1); } - fips_set_error_print(); - if(!FIPS_mode_set(1)) - exit(1); + fips_algtest_init(); FIPS_rand_reset(); if (!FIPS_rand_test_mode()) { |