Skip to content

Commit a514c5f

Browse files
committed
Remove certificate validation check
1 parent 868eb38 commit a514c5f

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

LibGit2Sharp/Core/ManagedHttpSmartSubtransport.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ static ManagedHttpSmartSubtransportStream()
6161
httpClientHandler = new HttpClientHandler();
6262

6363
httpClientHandler.SslProtocols |= SslProtocols.Tls12;
64-
//httpClientHandler.ServerCertificateCustomValidationCallback = CertificateValidationProxy;
6564

6665
httpClientHandler.AllowAutoRedirect = false;
6766

@@ -122,22 +121,6 @@ public override int Write(Stream dataStream, long length)
122121
return 0;
123122
}
124123

125-
private bool CertificateValidationProxy(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors errors)
126-
{
127-
try
128-
{
129-
int ret = SmartTransport.CertificateCheck(new CertificateX509(cert), (errors == SslPolicyErrors.None), EndpointUrl.Host);
130-
Ensure.ZeroResult(ret);
131-
132-
return true;
133-
}
134-
catch (Exception e)
135-
{
136-
SetError(e);
137-
return false;
138-
}
139-
}
140-
141124
private string GetUserAgent()
142125
{
143126
string userAgent = GlobalSettings.GetUserAgent();

0 commit comments

Comments
 (0)