Skip to content

Commit 8c12c07

Browse files
committed
Merge branch 'pr/91'
2 parents d137ffa + 48ca321 commit 8c12c07

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

PluginCore.cs

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.IO;
4+
using System.Net;
45

56
using Decal.Adapter;
67
using MyClasses.MetaViewWrappers;
@@ -76,6 +77,7 @@ protected override void Startup()
7677
{
7778
try
7879
{
80+
ServicePointManager.SecurityProtocol = SecurityProtocolTypeExtensions.Tls12;
7981
MVWireupHelper.WireupStart(this, Host);
8082
}
8183
catch (Exception ex)

SSLProtocolExtensions.cs

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
6+
7+
namespace System.Net
8+
{
9+
using System.Security.Authentication;
10+
public static class SecurityProtocolTypeExtensions
11+
{
12+
public const SecurityProtocolType Tls12 = (SecurityProtocolType)SslProtocolsExtensions.Tls12;
13+
public const SecurityProtocolType Tls11 = (SecurityProtocolType)SslProtocolsExtensions.Tls11;
14+
public const SecurityProtocolType SystemDefault = (SecurityProtocolType)0;
15+
}
16+
}
17+
18+
namespace System.Security.Authentication
19+
{
20+
public static class SslProtocolsExtensions
21+
{
22+
public const SslProtocols Tls12 = (SslProtocols)0x00000C00;
23+
public const SslProtocols Tls11 = (SslProtocols)0x00000300;
24+
}
25+
}

TownCrier.csproj

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<AppDesignerFolder>Properties</AppDesignerFolder>
1616
<RootNamespace>TownCrier</RootNamespace>
1717
<AssemblyName>TownCrier</AssemblyName>
18-
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
18+
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
1919
<FileAlignment>512</FileAlignment>
2020
<NuGetPackageImportStamp>
2121
</NuGetPackageImportStamp>
@@ -39,7 +39,7 @@
3939
</PropertyGroup>
4040
<ItemGroup>
4141
<Reference Include="Decal.Adapter">
42-
<HintPath>..\..\..\..\Program Files (x86)\Decal 3.0\Decal.Adapter.dll</HintPath>
42+
<HintPath>C:\Program Files (x86)\Decal 3.0\Decal.Adapter.dll</HintPath>
4343
<Private>False</Private>
4444
</Reference>
4545
<Reference Include="Decal.Interop.Core, Version=2.9.7.5, Culture=neutral, PublicKeyToken=481f17d392f1fb65, processorArchitecture=MSIL">
@@ -78,6 +78,7 @@
7878
<Compile Include="Profile.cs" />
7979
<Compile Include="Properties\AssemblyInfo.cs" />
8080
<Compile Include="TimedTrigger.cs" />
81+
<Compile Include="SSLProtocolExtensions.cs" />
8182
<Compile Include="Utilities.cs" />
8283
<Compile Include="VirindiViews\ViewSystemSelector.cs" />
8384
<Compile Include="VirindiViews\Wrapper.cs" />

0 commit comments

Comments
 (0)