From b685aa8e7ed1311250885b93840020d4f750b4da Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Wed, 28 Feb 2018 11:55:04 +0000 Subject: [PATCH] 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. --- LibGit2Sharp.Tests/desktop/SmartSubtransportFixture.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/LibGit2Sharp.Tests/desktop/SmartSubtransportFixture.cs b/LibGit2Sharp.Tests/desktop/SmartSubtransportFixture.cs index 950b6fc85..e72c0d7c1 100644 --- a/LibGit2Sharp.Tests/desktop/SmartSubtransportFixture.cs +++ b/LibGit2Sharp.Tests/desktop/SmartSubtransportFixture.cs @@ -259,6 +259,8 @@ public override int Write(Stream dataStream, long length) private static HttpWebRequest CreateWebRequest(string endpointUrl, bool isPost, string contentType) { + ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; + HttpWebRequest webRequest = (HttpWebRequest)HttpWebRequest.Create(endpointUrl); webRequest.UserAgent = "git/1.0 (libgit2 custom transport)"; webRequest.ServicePoint.Expect100Continue = false;