diff --git a/tests/ntlm_support.c b/tests/ntlm_support.c index ccf89624496..18d555ab3bf 100644 --- a/tests/ntlm_support.c +++ b/tests/ntlm_support.c @@ -33,11 +33,11 @@ int main(void) { +#ifdef NTLM #if defined(ENABLE_CRYPTO_OPENSSL) - crypto_load_provider("legacy"); - crypto_load_provider("default"); + provider_t *legacy = crypto_load_provider("legacy"); + provider_t *def = crypto_load_provider("default"); #endif -#ifdef NTLM if (!md_valid("MD4")) { msg(M_FATAL, "MD4 not supported"); @@ -46,6 +46,10 @@ main(void) { msg(M_FATAL, "MD5 not supported"); } +#if defined(ENABLE_CRYPTO_OPENSSL) + crypto_unload_provider("legacy", legacy); + crypto_unload_provider("default", def); +#endif #else /* ifdef NTLM */ msg(M_FATAL, "NTLM support not compiled in"); #endif