title: How to enforce TLS1.2 to Rest client using Rest Template
body: <p>I am consuming json webservice using Spring3.0 restTemplate by calling post method. </p>
  
  <pre><code>        MultiValueMap&lt;String, String&gt; headers = new LinkedMultiValueMap&lt;String, String&gt;();
          headers.add("Content-Type", MediaType.APPLICATION_JSON_VALUE);      
          HttpEntity&lt;Object&gt; entity = new HttpEntity&lt;Object&gt;(requestAsString, headers);
          postForObject = restTemplate.postForObject(url, entity, responseClass );
  </code></pre>
  
  <p>Our application is deployed in WAS server and trying to connect producer by creating socket connection with TLS1.0. However, now producer only supports TLS1.1 and TLS1.2.</p>
  
  <p>How to enforce restTempate to use TLS1.1 or TLS 1.2.</p>
  
  <p>Normally for apache httpclient code , create custom ProtocolSocketFactory and override createSocket method. However , in case of RestTemplate , how to achieve same.</p>