Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 873eb89

Browse files
committed
Merge pull request libgit2#2680 from libgit2/cmn/invalid-cert-return
netops: return GIT_ECERTIFICATE when it fails the basic tests
2 parents 0fab748 + 22fbb26 commit 873eb89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/netops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ static int verify_server_cert(gitno_ssl *ssl, const char *host)
276276

277277
if (SSL_get_verify_result(ssl->ssl) != X509_V_OK) {
278278
giterr_set(GITERR_SSL, "The SSL certificate is invalid");
279-
return -1;
279+
return GIT_ECERTIFICATE;
280280
}
281281

282282
/* Try to parse the host as an IP address to see if it is */

0 commit comments

Comments
 (0)