Skip to content

Commit 77e1f3c

Browse files
committed
Update TLS setting to only add 1.2 if it doesn't exist already
1 parent 1109ca6 commit 77e1f3c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/UmbracoFileSystemProviders.Azure/AzureFileSystem.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,10 @@ internal class AzureFileSystem : IFileSystem
9292
/// </exception>
9393
internal AzureFileSystem(string containerName, string rootUrl, string connectionString, int maxDays, bool useDefaultRoute, BlobContainerPublicAccessType accessType)
9494
{
95-
96-
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
95+
if (ServicePointManager.SecurityProtocol.HasFlag(SecurityProtocolType.Tls12) == false)
96+
{
97+
ServicePointManager.SecurityProtocol = ServicePointManager.SecurityProtocol | SecurityProtocolType.Tls12;
98+
}
9799

98100
if (string.IsNullOrWhiteSpace(containerName))
99101
{

0 commit comments

Comments
 (0)