Commit c342c1313239950b0a324b229851ad0af9252da3

Patrick Steinhardt 2017-12-15T04:01:13

Merge pull request #4444 from tiennou/fix/4440 stransport: provide error message on trust failures

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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;