mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Avoid warning about missing legacy provider unless debugging. Fixes #2532
This commit is contained in:
@@ -118,13 +118,15 @@ SSL_CTX *setup_ssl_listen(void)
|
|||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
SSL_load_error_strings();
|
SSL_load_error_strings();
|
||||||
#elif OPENSSL_VERSION_NUMBER >= 0x30000000L
|
#elif OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||||
if (NULL == OSSL_PROVIDER_load(NULL, "legacy"))
|
if (NULL == OSSL_PROVIDER_load(NULL, "legacy") && o.debug)
|
||||||
{
|
{
|
||||||
loguser("OpenSSL legacy provider failed to load.\n");
|
loguser("OpenSSL legacy provider failed to load: %s",
|
||||||
|
ERR_error_string(ERR_get_error(), NULL));
|
||||||
}
|
}
|
||||||
if (NULL == OSSL_PROVIDER_load(NULL, "default"))
|
if (NULL == OSSL_PROVIDER_load(NULL, "default"))
|
||||||
{
|
{
|
||||||
loguser("OpenSSL default provider failed to load.\n");
|
loguser("OpenSSL default provider failed to load: %s",
|
||||||
|
ERR_error_string(ERR_get_error(), NULL));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -123,11 +123,13 @@ static SSL_CTX *ssl_init_helper(const SSL_METHOD *method) {
|
|||||||
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||||
if (NULL == OSSL_PROVIDER_load(NULL, "legacy"))
|
if (NULL == OSSL_PROVIDER_load(NULL, "legacy"))
|
||||||
{
|
{
|
||||||
nsock_log_error("OpenSSL legacy provider failed to load.\n");
|
nsock_log_info("OpenSSL legacy provider failed to load: %s",
|
||||||
|
ERR_error_string(ERR_get_error(), NULL));
|
||||||
}
|
}
|
||||||
if (NULL == OSSL_PROVIDER_load(NULL, "default"))
|
if (NULL == OSSL_PROVIDER_load(NULL, "default"))
|
||||||
{
|
{
|
||||||
nsock_log_error("OpenSSL default provider failed to load.\n");
|
nsock_log_error("OpenSSL default provider failed to load: %s",
|
||||||
|
ERR_error_string(ERR_get_error(), NULL));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user