Skip to content

Commit

Permalink
Merge #2297 Force-allow TLS 1.2 on .NET 4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
politas committed Feb 23, 2018
2 parents 629c33f + 42c30cd commit a3528f3
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ env:
- BUILD_CONFIGURATION=Release

mono:
- 5.8.0
- 5.4.0
- 5.2.0
- 5.0.1
- 4.8.1
- 4.6.2
- 4.4.2

addons:
apt:
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

All notable changes to this project will be documented in this file.

## v1.24.0-PRE2
## v1.24.0

### Features

Expand Down Expand Up @@ -32,6 +32,9 @@ All notable changes to this project will be documented in this file.
- [Multiple] Handle invalid installs better (#2283 by: HebaruSan; reviewed: politas)
- [Core] Capture error details from SharpZipLib for invalid ZIPs (#2287 by: HebaruSan; reviewed: politas)
- [Netkan] Check zip validity in netkan (#2288 by: HebaruSan; reviewed: politas)
- [Core] Replace colons with hyphens in archive URLs (#2290 by: HebaruSan; reviewed: techman83)
- [Core] Force-allow TLS 1.2 on .NET 4.5 (#2297 by: HebaruSan; reviewed: politas)


## v1.24.0-PRE1 (McCandless)

Expand Down
5 changes: 5 additions & 0 deletions Cmdline/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// License: CC-BY 4.0, LGPL, or MIT (your choice)

using System;
using System.Net;
using System.Diagnostics;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -50,6 +51,10 @@ public static int Main(string[] args)
Logging.Initialize();
log.Info("CKAN started.");

// Force-allow TLS 1.2 for HTTPS URLs, because GitHub requires it.
// This is on by default in .NET 4.6, but not in 4.5.
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;

// If we're starting with no options then invoke the GUI instead.
if (args.Length == 0)
{
Expand Down
5 changes: 5 additions & 0 deletions Netkan/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Net;
using System.Diagnostics;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -31,6 +32,10 @@ public static int Main(string[] args)
{
ProcessArgs(args);

// Force-allow TLS 1.2 for HTTPS URLs, because GitHub requires it.
// This is on by default in .NET 4.6, but not in 4.5.
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;

// If we see the --version flag, then display our build info
// and exit.
if (Options.Version)
Expand Down
5 changes: 5 additions & 0 deletions quotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,8 @@ It is truly amazing how many extensions to BDArmory are only compatible with a
KSP version that BDArmory is not compatible with.

-- politas, NetKAN#4169
%
<HebaruSan> It's crazy that an app has to specify which version of TLS to use to get an HTTPS URL
<HebaruSan> I mean, how the heck do we know? You're WebClient, you figure it out!!

-- regarding CKAN#2297

0 comments on commit a3528f3

Please sign in to comment.