* https://www.openssl.org/source/license.html
*/
+#include <sys/stat.h>
#include <openssl/evp.h>
#include <openssl/conf.h>
#include "testutil.h"
return testresult;
}
-#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MACOSX) && !defined(NO_PROVIDER_MODULE)
static int test_path_config(void)
{
- OSSL_LIB_CTX *ctx = OSSL_LIB_CTX_new();
+ OSSL_LIB_CTX *ctx = NULL;
OSSL_PROVIDER *prov;
int testresult = 0;
+ struct stat sbuf;
+
+ if (stat("../test/p_test.so", &sbuf) == -1)
+ return TEST_skip("Skipping modulepath test as provider not present");
if (!TEST_ptr(pathedconfig))
return 0;
+
+ ctx = OSSL_LIB_CTX_new();
if (!TEST_ptr(ctx))
return 0;
OSSL_LIB_CTX_free(ctx);
return testresult;
}
-#endif
OPT_TEST_DECLARE_USAGE("configfile\n")
ADD_TEST(test_recursive_config);
ADD_TEST(test_double_config);
-#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MACOSX) && !defined(NO_PROVIDER_MODULE)
- /*
- * This test has to specify a module path to a file
- * Which is setup as ../test/p_test.so
- * Since windows/macos doesn't build with that extension
- * just skip the test here
- * Additionally skip it if we're not building provider modules
- */
ADD_TEST(test_path_config);
-#endif
return 1;
}