openssl: check SSL_get_peer_cert_chain return value
Signed-off-by: Jean-Philippe Menil <jpmenil@gmail.com> Closes #8579
This commit is contained in:
Родитель
e87c53d7ea
Коммит
680245cd39
|
@ -1927,6 +1927,11 @@ static CURLcode verifystatus(struct Curl_easy *data,
|
|||
}
|
||||
|
||||
ch = SSL_get_peer_cert_chain(backend->handle);
|
||||
if(!ch) {
|
||||
failf(data, "Could not get peer certificate chain");
|
||||
result = CURLE_SSL_INVALIDCERTSTATUS;
|
||||
goto end;
|
||||
}
|
||||
st = SSL_CTX_get_cert_store(backend->ctx);
|
||||
|
||||
#if ((OPENSSL_VERSION_NUMBER <= 0x1000201fL) /* Fixed after 1.0.2a */ || \
|
||||
|
|
Загрузка…
Ссылка в новой задаче