From 8e63f7d43616ec508a12c9162e1f2197c3ac4d8a Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Sat, 29 Jul 2017 11:35:10 +0200 Subject: [PATCH] Change default tls provider so users won't have to set TLS_PROVIDER explicitly. --- src/NzbDrone.Common/Security/SecurityProtocolPolicy.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/NzbDrone.Common/Security/SecurityProtocolPolicy.cs b/src/NzbDrone.Common/Security/SecurityProtocolPolicy.cs index 17c625ef6..04392e20e 100644 --- a/src/NzbDrone.Common/Security/SecurityProtocolPolicy.cs +++ b/src/NzbDrone.Common/Security/SecurityProtocolPolicy.cs @@ -2,6 +2,7 @@ using System.Net; using NLog; using NzbDrone.Common.EnvironmentInfo; +using NzbDrone.Common.Extensions; using NzbDrone.Common.Instrumentation; namespace NzbDrone.Common.Security @@ -18,6 +19,11 @@ namespace NzbDrone.Common.Security if (OsInfo.IsNotWindows) { // This was never meant to be used on mono, and will cause issues with mono 5 and higher if btls is enabled. + // Instead, force TLS provider to legacy for now due to conflict between btls and mediainfo, unless the user explicitly specified it. + if (Environment.GetEnvironmentVariable("MONO_TLS_PROVIDER").IsNullOrWhiteSpace()) + { + Environment.SetEnvironmentVariable("MONO_TLS_PROVIDER", "legacy"); + } return; }