Click here to Skip to main content
15,743,934 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
As per this article to enable TSL1.2 we need to update "SecureProtocol" key in below to registry locations with other registry keys.

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings

The challenge here is, we need to update this keys in all the clients machines with an installer. I tried to update this to keys while installer is installing but the installer can only access Local Machine Internet setting key. It could not access Current User internet settings key because installer is running under System context.

The installer is set to run in Deferred Execution under System Context to install for all the clients who does not have admin privileges. I can't change installer configuration now.

My question is Setting "Secure Protocol" value under local machine internet settings is not enough to enable TLS1.2?

Is it mandatory to set "Secure Protocol" value under Current User internet settings as well?

thanks in advance.

What I have tried:

I tried setting current User registry using SID while installer is installing but the installer is not finding currently logged in user SID.
Updated 18-May-18 7:04am
MadMyche 23-May-18 17:13pm    
What flavor of Windows and .Net Framework? Win versions 5.2 and lower will not support anything over TLS 1.0

1 solution

I set "Secure Protocol" in the app as required:
   ServicePointManager.ServerCertificateValidationCallback += ValidateCertificate;

   ServicePointManager.SecurityProtocol =
      SecurityProtocolType.Tls |
      SecurityProtocolType.Tls11 |
      SecurityProtocolType.Tls12 |

   try {
      // Related process.

   } finally {
      ServicePointManager.ServerCertificateValidationCallback -= ValidateCertificate;

private static bool ValidateCertificate(
   Object sender, X509Certificate cert, X509Chain chain,
   SslPolicyErrors Errors ) {

   return true;
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900