diff options
author | Matt Caswell <matt@openssl.org> | 2020-04-07 18:03:19 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-04-20 12:29:17 +0200 |
commit | 682bc861a92d09fb5155cd1aceee7b1ce298ddb9 (patch) | |
tree | 5ff0daf7044a6606e2fe124cc15d8850c78226b7 /test/ssl_test.c | |
parent | Teach ssl_test_new to have different tests for different loaded providers (diff) | |
download | openssl-682bc861a92d09fb5155cd1aceee7b1ce298ddb9.tar.xz openssl-682bc861a92d09fb5155cd1aceee7b1ce298ddb9.zip |
Teach ssl_test_new how to test the FIPS module
We load the FIPS module and make sure it is configured before running
the ssl_test_new tests.
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11511)
Diffstat (limited to 'test/ssl_test.c')
-rw-r--r-- | test/ssl_test.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/ssl_test.c b/test/ssl_test.c index c4f1c6006e..d7fd9c273f 100644 --- a/test/ssl_test.c +++ b/test/ssl_test.c @@ -511,7 +511,7 @@ err: return ret; } -OPT_TEST_DECLARE_USAGE("conf_file\n") +OPT_TEST_DECLARE_USAGE("conf_file modulename [fips_conf_file]\n") int setup_tests(void) { @@ -534,11 +534,17 @@ int setup_tests(void) return 0; if (strcmp(modulename, "none") != 0) { + const char *configfile = test_get_argument(2); + defctxnull = OSSL_PROVIDER_load(NULL, "null"); libctx = OPENSSL_CTX_new(); if (!TEST_ptr(libctx)) return 0; + if (configfile != NULL + && !TEST_true(OPENSSL_CTX_load_config(libctx, configfile))) + return 0; + thisprov = OSSL_PROVIDER_load(libctx, modulename); if (!TEST_ptr(thisprov)) return 0; |