Commit 6a10b80201fe26288b60bf7dda568408e75ffb88

Ian Hattendorf 2020-06-24T08:53:46

winhttp: clarify invalid cert case

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/transports/winhttp.c b/src/transports/winhttp.c
index 98e80ab..89cbaeb 100644
--- a/src/transports/winhttp.c
+++ b/src/transports/winhttp.c
@@ -889,7 +889,7 @@ static int send_request(winhttp_stream *s, size_t len, bool chunked)
 			}
 		}
 
-		if (!request_failed || send_request_error == ERROR_WINHTTP_SECURE_FAILURE) {
+		if (!request_failed || !cert_valid) {
 			git_error_clear();
 			if ((error = certificate_check(s, cert_valid)) < 0) {
 				if (!git_error_last())