Skip to content

Commit

Permalink
Merge branch 'pr/91'
Browse files Browse the repository at this point in the history
  • Loading branch information
amoeba committed Jul 14, 2022
2 parents d137ffa + 48ca321 commit 8c12c07
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
2 changes: 2 additions & 0 deletions PluginCore.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;

using Decal.Adapter;
using MyClasses.MetaViewWrappers;
Expand Down Expand Up @@ -76,6 +77,7 @@ protected override void Startup()
{
try
{
ServicePointManager.SecurityProtocol = SecurityProtocolTypeExtensions.Tls12;
MVWireupHelper.WireupStart(this, Host);
}
catch (Exception ex)
Expand Down
25 changes: 25 additions & 0 deletions SSLProtocolExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


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;
}
}

namespace System.Security.Authentication
{
public static class SslProtocolsExtensions
{
public const SslProtocols Tls12 = (SslProtocols)0x00000C00;
public const SslProtocols Tls11 = (SslProtocols)0x00000300;
}
}
5 changes: 3 additions & 2 deletions TownCrier.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>TownCrier</RootNamespace>
<AssemblyName>TownCrier</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
Expand All @@ -39,7 +39,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Decal.Adapter">
<HintPath>..\..\..\..\Program Files (x86)\Decal 3.0\Decal.Adapter.dll</HintPath>
<HintPath>C:\Program Files (x86)\Decal 3.0\Decal.Adapter.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Decal.Interop.Core, Version=2.9.7.5, Culture=neutral, PublicKeyToken=481f17d392f1fb65, processorArchitecture=MSIL">
Expand Down Expand Up @@ -78,6 +78,7 @@
<Compile Include="Profile.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TimedTrigger.cs" />
<Compile Include="SSLProtocolExtensions.cs" />
<Compile Include="Utilities.cs" />
<Compile Include="VirindiViews\ViewSystemSelector.cs" />
<Compile Include="VirindiViews\Wrapper.cs" />
Expand Down

0 comments on commit 8c12c07

Please sign in to comment.