pull/3113/head
kay.one 12 years ago
parent aa50be076c
commit e0bf68123d

@ -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" />

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

@ -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>

@ -5,6 +5,7 @@ using NzbDrone.Common;
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 @@ namespace NzbDrone.Update
try
{
Console.WriteLine("Starting NzbDrone Update Client");
IgnoreCertErrorPolicy.Register();
GlobalExceptionHandlers.Register();
new LogglyTarget().Register(LogLevel.Debug);

@ -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>

@ -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 @@ namespace NzbDrone
try
{
GlobalExceptionHandlers.Register();
IgnoreCertErrorPolicy.Register();
new LogglyTarget().Register(LogLevel.Warn);

Loading…
Cancel
Save