Skip to content

Commit b685aa8

Browse files
committed
SmartSubtransport: use TLS 1.2 for tests
The subtransport tests create a new subtransport and tests that it can talk to github.com. GitHub recently required TLS 1.2 connections, upgrade our test to build a TLS 1.2 connection to GitHub.
1 parent 2a8af3a commit b685aa8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

LibGit2Sharp.Tests/desktop/SmartSubtransportFixture.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ public override int Write(Stream dataStream, long length)
259259

260260
private static HttpWebRequest CreateWebRequest(string endpointUrl, bool isPost, string contentType)
261261
{
262+
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
263+
262264
HttpWebRequest webRequest = (HttpWebRequest)HttpWebRequest.Create(endpointUrl);
263265
webRequest.UserAgent = "git/1.0 (libgit2 custom transport)";
264266
webRequest.ServicePoint.Expect100Continue = false;

0 commit comments

Comments
 (0)