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/aes | |
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/aes')
-rw-r--r-- | fips/aes/fips_aesavs.c | 6 | ||||
-rw-r--r-- | fips/aes/fips_gcmtest.c | 4 |
2 files changed, 2 insertions, 8 deletions
diff --git a/fips/aes/fips_aesavs.c b/fips/aes/fips_aesavs.c index c9e2ce3b94..72c2d0967c 100644 --- a/fips/aes/fips_aesavs.c +++ b/fips/aes/fips_aesavs.c @@ -867,12 +867,8 @@ int main(int argc, char **argv) FILE *fp = NULL; char fn[250] = "", rfn[256] = ""; int f_opt = 0, d_opt = 1; - fips_set_error_print(); + fips_algtest_init(); -#ifdef OPENSSL_FIPS - if(!FIPS_mode_set(1)) - EXIT(1); -#endif if (argc > 1) { if (strcasecmp(argv[1], "-d") == 0) diff --git a/fips/aes/fips_gcmtest.c b/fips/aes/fips_gcmtest.c index 5eb7e7f967..7c9efe7d6d 100644 --- a/fips/aes/fips_gcmtest.c +++ b/fips/aes/fips_gcmtest.c @@ -292,9 +292,7 @@ int main(int argc,char **argv) fprintf(stderr,"%s [-encrypt|-decrypt]\n",argv[0]); exit(1); } - fips_set_error_print(); - if(!FIPS_mode_set(1)) - exit(1); + fips_algtest_init(); if(!strcmp(argv[1],"-encrypt")) encrypt = 1; else if(!strcmp(argv[1],"-encryptIVext")) |