mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-22 19:19:41 +00:00
netops: return GIT_ECERTIFICATE when it fails the basic tests
When we first ask OpenSSL to verify the certfiicate itself (rather than the HTTPS specifics), we should also return GIT_ECERTIFICATE. Otherwise, the caller would consider this as a failed operation rather than a failed validation and not call the user's own validation.
This commit is contained in:
parent
264d74fd40
commit
22fbb2656e
@ -276,7 +276,7 @@ static int verify_server_cert(gitno_ssl *ssl, const char *host)
|
|||||||
|
|
||||||
if (SSL_get_verify_result(ssl->ssl) != X509_V_OK) {
|
if (SSL_get_verify_result(ssl->ssl) != X509_V_OK) {
|
||||||
giterr_set(GITERR_SSL, "The SSL certificate is invalid");
|
giterr_set(GITERR_SSL, "The SSL certificate is invalid");
|
||||||
return -1;
|
return GIT_ECERTIFICATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Try to parse the host as an IP address to see if it is */
|
/* Try to parse the host as an IP address to see if it is */
|
||||||
|
Loading…
Reference in New Issue
Block a user