From 77e1f3c60e6bed11eae98d1b152cbec5e615058a Mon Sep 17 00:00:00 2001 From: Jeavon Leopold Date: Wed, 14 Jul 2021 13:25:06 +0100 Subject: [PATCH] Update TLS setting to only add 1.2 if it doesn't exist already --- src/UmbracoFileSystemProviders.Azure/AzureFileSystem.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/UmbracoFileSystemProviders.Azure/AzureFileSystem.cs b/src/UmbracoFileSystemProviders.Azure/AzureFileSystem.cs index aac197f..9ec8a2f 100644 --- a/src/UmbracoFileSystemProviders.Azure/AzureFileSystem.cs +++ b/src/UmbracoFileSystemProviders.Azure/AzureFileSystem.cs @@ -92,8 +92,10 @@ internal class AzureFileSystem : IFileSystem /// internal AzureFileSystem(string containerName, string rootUrl, string connectionString, int maxDays, bool useDefaultRoute, BlobContainerPublicAccessType accessType) { - - ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12; + if (ServicePointManager.SecurityProtocol.HasFlag(SecurityProtocolType.Tls12) == false) + { + ServicePointManager.SecurityProtocol = ServicePointManager.SecurityProtocol | SecurityProtocolType.Tls12; + } if (string.IsNullOrWhiteSpace(containerName)) {