Skip to content

Commit

Permalink
Accept all available encryption protocols available to the .NET 4.0 F…
Browse files Browse the repository at this point in the history
…ramework (TLS 1.0, 1.1, 1.2; SSL 3)

git-svn-id: https://svn.openstreetmap.org/applications/utils/Srtm2Osm/trunk@33758 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
  • Loading branch information
mibe committed Oct 31, 2017
1 parent 200cb6f commit c3e2e1e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 0 additions & 1 deletion OsmUtils.Framework/OsmUtils.Framework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
<Link>CommonAssemblyInfo.cs</Link>
</Compile>
<Compile Include="ExpressionFunctions.cs" />
<Compile Include="ExpressionSelector.cs" />
<Compile Include="IOsmElementSelector.cs" />
<Compile Include="KeyValueSelector.cs" />
<Compile Include="MultipleKeyValueSelector.cs" />
Expand Down
9 changes: 8 additions & 1 deletion Srtm2Osm/Srtm2OsmCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using Brejc.Geometry;
using System.Text.RegularExpressions;
using System.Globalization;
using System.Net;

namespace Srtm2Osm
{
Expand Down Expand Up @@ -49,8 +50,14 @@ public void Execute ()
ConsoleActivityLogger activityLogger = new ConsoleActivityLogger();
activityLogger.LogLevel = ActivityLogLevel.Verbose;

// Use all available encryption protocols supported in the .NET Framework 4.0.
// TLS versions > 1.0 are supported and available via the extensions.
// see https://blogs.perficient.com/microsoft/2016/04/tsl-1-2-and-net-support/
// This is a global setting for all HTTP requests.
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolTypeExtensions.Tls11 | SecurityProtocolTypeExtensions.Tls12 | SecurityProtocolType.Ssl3;

// first make sure that the SRTM directory exists
if (false == Directory.Exists (srtmDir))
if (!Directory.Exists (srtmDir))
Directory.CreateDirectory (srtmDir);

string srtmIndexFilename = Path.Combine (srtmDir, "SrtmIndex.dat");
Expand Down

0 comments on commit c3e2e1e

Please sign in to comment.