Merge pull request #4444 from tiennou/fix/4440 stransport: provide error message on trust failures
diff --git a/src/streams/stransport.c b/src/streams/stransport.c
index 64a5dd7..cca17bb 100644
--- a/src/streams/stransport.c
+++ b/src/streams/stransport.c
@@ -83,8 +83,10 @@ static int stransport_connect(git_stream *stream)
}
if (sec_res == kSecTrustResultDeny || sec_res == kSecTrustResultRecoverableTrustFailure ||
- sec_res == kSecTrustResultFatalTrustFailure)
+ sec_res == kSecTrustResultFatalTrustFailure) {
+ giterr_set(GITERR_SSL, "untrusted connection error");
return GIT_ECERTIFICATE;
+ }
return 0;