title: Windows XP Embedded PosReady 2009 support for TLS1.2
body: <p>By default support for TLS1.2 is not enabled on Windows Embedded PosReady 2009. </p>
  
  <p>However microsoft released KB4019276 (<a href="https://support.microsoft.com/en-us/help/4019276/update-to-add-support-for-tls-1-1-and-tls-1-2-in-windows" rel="nofollow noreferrer">https://support.microsoft.com/en-us/help/4019276/update-to-add-support-for-tls-1-1-and-tls-1-2-in-windows</a>) which adds this support. </p>
  
  <p>Ive added the registry DWORD DisabledByDefault to the keys below as defined in the article. </p>
  
  <pre><code>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client
  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server
  </code></pre>
  
  <p>Ive restarted the device after installing the KB and making the registry changes however its still not working for me. Below is the TLS1.2 code im using to test the changes. </p>
  
  <p>The exception is </p>
  
  <pre><code>System.NotSupportedException: The requested security protocol is not supported.
     at System.Net.ServicePointManager.set_SecurityProtocol(SecurityProtocolType value)
  </code></pre>
  
  <p>The code is compiled with .net 3.5 and 3.5 is the highest .net framework that this device will support. </p>
  
  <pre><code>Console.WriteLine("Press Enter to send TLS1.2 to google.com");
  Console.ReadLine();
  
  System.Net.ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;   // Sets TLS1.2. This will only work if the OS supports it. 
  
  string url = "https://www.google.com";
  var req = (HttpWebRequest)WebRequest.Create(url);
  req.Method = "GET";
  
  var resp = req.GetResponse();
  var outStream = resp.GetResponseStream();
  string output = "";
  using (StreamReader rdr = new StreamReader(outStream))
  {
      output = rdr.ReadToEnd();
  }
  Console.WriteLine(output);
  Console.ReadLine();
  </code></pre>