title: C# OpenSSL to achieve TLS1.2 in .Net Framework 4.0
body: <p>I have requirement to achieve TLS1.2 in .Net framework 4.0 using OpenSSL.</p>
  
  <p>I searched a lot for same but unable to find the code snippet for use of  OpenSSL to set TLS1.2 security protocol instead of existing way OR another possible way of adding OpenSSL into it</p>
  
  <p>My requirement is:</p>
  
  <ol>
  <li>Communicate to our web service using TLS1.2 (Send request and read response from web service)  </li>
  <li>We can not upgrade machines to .Net framework 4.5, they have framework .Net 4.0</li>
  </ol>
  
  <p>Current code implementation is as below where we are allowed/have .Net framework 4.0 and above</p>
  
  <pre><code>var request = (HttpWebRequest)WebRequest.Create(strHostUrl);
              request.Method = "POST";                
              request.ContentType = "application/json";
              request.UserAgent = "Java/1.7.0_51";
              request.ContentLength = strRequest.Length;
              request.Proxy = null;
              request.KeepAlive = false;
              request.Timeout = intTimeoutInMS;
              request.ReadWriteTimeout = 3000;
              ServicePointManager.SecurityProtocol = (SecurityProtocolType)192 | (SecurityProtocolType)768 | (SecurityProtocolType)3072;
  </code></pre>
  
  <p>We are seeing for option of using OpenSSL to achieve TLS1.2.</p>
  
  <p>Is it possible to achieve the same? Can anyone please provide some help on above question.</p>