From: Fabian Keil Date: Thu, 11 Jul 2024 08:21:03 +0000 (+0200) Subject: OpenSSL generate_key(): Check EVP_RSA_gen()'s return value X-Git-Url: http://www.privoxy.org/gitweb/user-manual/quickstart.html?a=commitdiff_plain;h=b4d45ec090c208cb1715c246bb5431eeaf1162ea;p=privoxy.git OpenSSL generate_key(): Check EVP_RSA_gen()'s return value --- diff --git a/openssl.c b/openssl.c index f3920370..ba2fc3e1 100644 --- a/openssl.c +++ b/openssl.c @@ -1538,6 +1538,12 @@ static int generate_key(struct client_state *csp, char **key_buf) } #else key = EVP_RSA_gen(RSA_KEYSIZE); + if (key == NULL) + { + log_error(LOG_LEVEL_ERROR, "EVP_RSA_gen() failed"); + ret = -1; + goto exit; + } #endif /*