This commit is contained in:
Y.Horie 2026-04-08 10:34:39 +00:00 committed by GitHub
commit 390fc850e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -625,6 +625,12 @@ retry:
"SSL_CTX_use_PrivateKey(\"%s\") failed", key->data);
return NGX_ERROR;
}
if (SSL_CTX_check_private_key(ssl->ctx) == 0) {
ngx_ssl_error(NGX_LOG_EMERG, ssl->log, 0,
"SSL_CTX_check_private_key(\"%s\") failed", key->data);
EVP_PKEY_free(pkey);
return NGX_ERROR;
}
EVP_PKEY_free(pkey);