Skip to content

Commit

Permalink
D-16962 Configured to support TLS 1.1, 1.2 at Initialize.
Browse files Browse the repository at this point in the history
  • Loading branch information
Laureano Remedi committed Jun 18, 2020
1 parent d79a62e commit 5f4002d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions VersionOne.ServiceHost.Core/CommonMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Net;
using System.Reflection;
using System.Threading;
using Ninject;
Expand Down Expand Up @@ -38,6 +39,7 @@ public void Initialize()
Logger = new Logger(EventManager);
services = (IList<ServiceInfo>)ConfigurationManager.GetSection("Services");
profileStore = new XmlProfileStore("profile.xml");
ConfigureSecurityProtocolDefauts();
}

private void LogDiagnosticInformation()
Expand Down Expand Up @@ -107,5 +109,12 @@ private void FlushProfileImpl(object o)
{
profileStore.Flush();
}

private void ConfigureSecurityProtocolDefauts()
{
SecurityProtocolType updatedType = ServicePointManager.SecurityProtocol & ~(SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls);
if (ServicePointManager.SecurityProtocol != updatedType)
ServicePointManager.SecurityProtocol = updatedType | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
}
}
}

0 comments on commit 5f4002d

Please sign in to comment.