Skip to content

Commit

Permalink
TLS > 1.0 support for .NET < 4.5 through the extension classes.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.openstreetmap.org/applications/utils/Srtm2Osm/trunk@33755 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
  • Loading branch information
mibe committed Oct 30, 2017
1 parent d498994 commit 200cb6f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Brejc.Common.Library/Brejc.Common.Library.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
</ItemGroup>
<ItemGroup>
<Compile Include="AsyncOperationCallback.cs" />
<Compile Include="Compatibility\SecurityProtocolTypeExtensions.cs" />
<Compile Include="Compatibility\SslProtocolsExtensions.cs" />
<Compile Include="Console\ConsoleApplicationBase.cs" />
<Compile Include="Console\ConsoleApplicationOption.cs" />
<Compile Include="Console\IConsoleApplicationCommand.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// 1:1 copy from Microsoft's KB3154518

namespace System.Net
{
using System.Security.Authentication;
public static class SecurityProtocolTypeExtensions
{
public const SecurityProtocolType Tls12 = (SecurityProtocolType)SslProtocolsExtensions.Tls12;
public const SecurityProtocolType Tls11 = (SecurityProtocolType)SslProtocolsExtensions.Tls11;
public const SecurityProtocolType SystemDefault = (SecurityProtocolType)0;
}
}
10 changes: 10 additions & 0 deletions Brejc.Common.Library/Compatibility/SslProtocolsExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// 1:1 copy from Microsoft's KB3154518

namespace System.Security.Authentication
{
public static class SslProtocolsExtensions
{
public const SslProtocols Tls12 = (SslProtocols)0x00000C00;
public const SslProtocols Tls11 = (SslProtocols)0x00000300;
}
}

0 comments on commit 200cb6f

Please sign in to comment.