1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01: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\GlobalExceptionHandlers.cs" />
<Compile Include="Instrumentation\ExceptronTarget.cs" /> <Compile Include="Instrumentation\ExceptronTarget.cs" />
<Compile Include="Messaging\LimitedConcurrencyLevelTaskScheduler.cs" /> <Compile Include="Messaging\LimitedConcurrencyLevelTaskScheduler.cs" />
<Compile Include="Security\IgnoreCertErrorPolicy.cs" />
<Compile Include="StringExtensions.cs" /> <Compile Include="StringExtensions.cs" />
<Compile Include="EnsureThat\TypeParam.cs" /> <Compile Include="EnsureThat\TypeParam.cs" />
<Compile Include="HashUtil.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> <WarningLevel>4</WarningLevel>
<UseVSHostingProcess>true</UseVSHostingProcess> <UseVSHostingProcess>true</UseVSHostingProcess>
<CodeAnalysisRuleSet>BasicCorrectnessRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>BasicCorrectnessRules.ruleset</CodeAnalysisRuleSet>
<IntermediateOutputPath>C:\Users\Mark\AppData\Local\Temp\vs1A55.tmp\x86\Debug\</IntermediateOutputPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
@ -53,7 +52,6 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<IntermediateOutputPath>C:\Users\Mark\AppData\Local\Temp\vs1A55.tmp\x86\Release\</IntermediateOutputPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>..\NzbDrone\NzbDrone.ico</ApplicationIcon> <ApplicationIcon>..\NzbDrone\NzbDrone.ico</ApplicationIcon>

View File

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

View File

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

View File

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