1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-23 08:13:01 +00:00
This commit is contained in:
kay.one 2013-07-07 10:19:08 -07:00
parent aa50be076c
commit e0bf68123d
6 changed files with 35 additions and 3 deletions

View file

@ -110,6 +110,7 @@
<Compile Include="Instrumentation\GlobalExceptionHandlers.cs" />
<Compile Include="Instrumentation\ExceptronTarget.cs" />
<Compile Include="Messaging\LimitedConcurrencyLevelTaskScheduler.cs" />
<Compile Include="Security\IgnoreCertErrorPolicy.cs" />
<Compile Include="StringExtensions.cs" />
<Compile Include="EnsureThat\TypeParam.cs" />
<Compile Include="HashUtil.cs" />

View file

@ -0,0 +1,27 @@
using System.Net;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using NLog;
using NzbDrone.Common.EnvironmentInfo;
namespace NzbDrone.Common.Security
{
public static class IgnoreCertErrorPolicy
{
private static readonly Logger Logger = LogManager.GetLogger("CertPolicy");
public static void Register()
{
if (OsInfo.IsLinux)
{
ServicePointManager.ServerCertificateValidationCallback = ValidationCallback;
}
}
private static bool ValidationCallback(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslpolicyerrors)
{
Logger.Warn("[{0}] {1}", sender.GetType(), sslpolicyerrors);
return true;
}
}
}

View file

@ -43,7 +43,6 @@
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>true</UseVSHostingProcess>
<CodeAnalysisRuleSet>BasicCorrectnessRules.ruleset</CodeAnalysisRuleSet>
<IntermediateOutputPath>C:\Users\Mark\AppData\Local\Temp\vs1A55.tmp\x86\Debug\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
@ -53,7 +52,6 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<IntermediateOutputPath>C:\Users\Mark\AppData\Local\Temp\vs1A55.tmp\x86\Release\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>..\NzbDrone\NzbDrone.ico</ApplicationIcon>

View file

@ -5,6 +5,7 @@
using NzbDrone.Common.Composition;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Instrumentation;
using NzbDrone.Common.Security;
using NzbDrone.Update.UpdateEngine;
namespace NzbDrone.Update
@ -28,6 +29,9 @@ public static void Main(string[] args)
try
{
Console.WriteLine("Starting NzbDrone Update Client");
IgnoreCertErrorPolicy.Register();
GlobalExceptionHandlers.Register();
new LogglyTarget().Register(LogLevel.Debug);

View file

@ -2,6 +2,7 @@
<FileVersion>1</FileVersion>
<AutoEnableOnStartup>False</AutoEnableOnStartup>
<AllowParallelTestExecution>true</AllowParallelTestExecution>
<AllowTestsToRunInParallelWithThemselves>true</AllowTestsToRunInParallelWithThemselves>
<FrameworkUtilisationTypeForNUnit>UseDynamicAnalysis</FrameworkUtilisationTypeForNUnit>
<FrameworkUtilisationTypeForGallio>Disabled</FrameworkUtilisationTypeForGallio>
<FrameworkUtilisationTypeForMSpec>Disabled</FrameworkUtilisationTypeForMSpec>

View file

@ -2,8 +2,8 @@
using System.Diagnostics;
using System.Reflection;
using NLog;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Instrumentation;
using NzbDrone.Common.Security;
using NzbDrone.Core.Datastore;
namespace NzbDrone
@ -18,6 +18,7 @@ public static void Main(string[] args)
try
{
GlobalExceptionHandlers.Register();
IgnoreCertErrorPolicy.Register();
new LogglyTarget().Register(LogLevel.Warn);