Skip to content

Commit 1b2e83a

Browse files
committed
stransport: provide error message on trust failures
Fixes libgit2#4440
1 parent 1bf173c commit 1b2e83a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/streams/stransport.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ static int stransport_connect(git_stream *stream)
8383
}
8484

8585
if (sec_res == kSecTrustResultDeny || sec_res == kSecTrustResultRecoverableTrustFailure ||
86-
sec_res == kSecTrustResultFatalTrustFailure)
86+
sec_res == kSecTrustResultFatalTrustFailure) {
87+
giterr_set(GITERR_SSL, "untrusted connection error");
8788
return GIT_ECERTIFICATE;
89+
}
8890

8991
return 0;
9092

0 commit comments

Comments
 (0)