app/list: add RNG list option
[oweals/openssl.git] / test / ssl_test.c
index c4f1c6006e076691da9d1eaf52ea52ea02d44bdc..731f569743b6492f4851d464315d559c383e6ce7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved.
  *
  * Licensed under the Apache License 2.0 (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
@@ -19,6 +19,8 @@
 #include "ssl_test_ctx.h"
 #include "testutil.h"
 
+DEFINE_STACK_OF(X509_NAME)
+
 static CONF *conf = NULL;
 static OSSL_PROVIDER *defctxnull = NULL, *thisprov = NULL;
 static OPENSSL_CTX *libctx = NULL;
@@ -511,7 +513,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 +536,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;