X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=test%2Fenginetest.c;h=9957f59dc3d6cbcaeba127155e437726c239b140;hp=b4d117efa2a64f8686f5e5764381f84bbe17bf96;hb=5800ba761052894145abe7a74a1159df007b6875;hpb=3cb45a55853db05d5af1b564a55491a22f592305 diff --git a/test/enginetest.c b/test/enginetest.c index b4d117efa2..9957f59dc3 100644 --- a/test/enginetest.c +++ b/test/enginetest.c @@ -121,8 +121,12 @@ static int test_engines(void) display_engine_list(); /* - * Depending on whether there's any hardware support compiled in, this - * remove may be destined to fail. + * At this point, we should have an empty list, unless some hardware + * support engine got added. However, since we don't allow the config + * file to be loaded and don't otherwise load any built in engines, + * that is unlikely. Still, we check, if for nothing else, then to + * notify that something is a little off (and might mean that |new_h1| + * wasn't unloaded when it should have) */ if ((ptr = ENGINE_get_first()) != NULL) { if (!ENGINE_remove(ptr)) @@ -347,6 +351,15 @@ static int test_redirect(void) } #endif +int global_init(void) +{ + /* + * If the config file gets loaded, the dynamic engine will be loaded, + * and that interferes with our test above. + */ + return OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL); +} + int setup_tests(void) { #ifdef OPENSSL_NO_ENGINE