Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace StyleCop.Analyzers.Test.Verifiers
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using global::LightJson;
Expand Down Expand Up @@ -91,6 +92,16 @@ internal class CSharpTest : CSharpCodeFixTest<TAnalyzer, TCodeFix, XUnitVerifier
private const int DefaultTabSize = 4;
private const bool DefaultUseTabs = false;

static CSharpTest()
{
// If we have outdated defaults from the host unit test application targeting an older .NET Framework,
// use more reasonable TLS protocol version for outgoing connections.
if (ServicePointManager.SecurityProtocol == (SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls))
{
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
}
}

public CSharpTest()
: this(languageVersion: null)
{
Expand Down