diff --git a/Octokit.Tests.Integration/Octokit.Tests.Integration.csproj b/Octokit.Tests.Integration/Octokit.Tests.Integration.csproj
index f023046741..0a690798d5 100644
--- a/Octokit.Tests.Integration/Octokit.Tests.Integration.csproj
+++ b/Octokit.Tests.Integration/Octokit.Tests.Integration.csproj
@@ -4,7 +4,7 @@
Integration tests for Octokit
Octokit.Tests.Integration
GitHub
- netcoreapp1.0
+ netcoreapp1.0;net452
$(NoWarn);CS4014;CS1998
Octokit.Tests.Integration
Octokit.Tests.Integration
@@ -27,7 +27,7 @@
-
+
diff --git a/Octokit/Http/HttpClientAdapter.cs b/Octokit/Http/HttpClientAdapter.cs
index ca14a34821..0050aae34b 100644
--- a/Octokit/Http/HttpClientAdapter.cs
+++ b/Octokit/Http/HttpClientAdapter.cs
@@ -27,6 +27,10 @@ public HttpClientAdapter(Func getHandler)
{
Ensure.ArgumentNotNull(getHandler, "getHandler");
+#if HAS_SERVICEPOINTMANAGER
+ ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;
+#endif
+
_http = new HttpClient(new RedirectHandler { InnerHandler = getHandler() });
}
@@ -278,4 +282,4 @@ public void SetRequestTimeout(TimeSpan timeout)
internal class RedirectHandler : DelegatingHandler
{
}
-}
\ No newline at end of file
+}
diff --git a/Octokit/Octokit.csproj b/Octokit/Octokit.csproj
index 9388c8c645..1a561c058b 100644
--- a/Octokit/Octokit.csproj
+++ b/Octokit/Octokit.csproj
@@ -23,7 +23,7 @@
- $(DefineConstants);HAS_ENVIRONMENT;HAS_REGEX_COMPILED_OPTIONS;SIMPLE_JSON_INTERNAL,SIMPLE_JSON_OBJARRAYINTERNAL,SIMPLE_JSON_READONLY_COLLECTIONS
+ $(DefineConstants);HAS_ENVIRONMENT;HAS_REGEX_COMPILED_OPTIONS;SIMPLE_JSON_INTERNAL;SIMPLE_JSON_OBJARRAYINTERNAL;SIMPLE_JSON_READONLY_COLLECTIONS;HAS_SERVICEPOINTMANAGER