mirror of
https://github.com/curl/curl.git
synced 2026-04-23 15:12:17 +03:00
OpenSSL: use failf() when subjectAltName mismatches
Write to CURLOPT_ERRORBUFFER information about mismatch alternative certificate subject names. Signed-off-by: Andrej E Baranov <admin@andrej-andb.ru>
This commit is contained in:
parent
5df04bfafd
commit
39beaa5ffb
1 changed files with 2 additions and 0 deletions
|
|
@ -1192,6 +1192,8 @@ static CURLcode verifyhost(struct connectdata *conn,
|
||||||
/* an alternative name field existed, but didn't match and then
|
/* an alternative name field existed, but didn't match and then
|
||||||
we MUST fail */
|
we MUST fail */
|
||||||
infof(data, "\t subjectAltName does not match %s\n", conn->host.dispname);
|
infof(data, "\t subjectAltName does not match %s\n", conn->host.dispname);
|
||||||
|
failf(data, "SSL: alternative certificate subject names does not match "
|
||||||
|
"target host name '%s'", conn->host.dispname);
|
||||||
res = CURLE_PEER_FAILED_VERIFICATION;
|
res = CURLE_PEER_FAILED_VERIFICATION;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue