Skip to content

Commit

Permalink
Update TLS setting to only add 1.2 if it doesn't exist already
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeavon committed Jul 14, 2021
1 parent 1109ca6 commit 77e1f3c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/UmbracoFileSystemProviders.Azure/AzureFileSystem.cs
Expand Up @@ -92,8 +92,10 @@ internal class AzureFileSystem : IFileSystem
/// </exception>
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))
{
Expand Down

0 comments on commit 77e1f3c

Please sign in to comment.