Answers for "org.apache.http.client.httpclient set tls version"

0

org.apache.http.client.httpclient set tls version

SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(
  SSLContexts.createDefault(),
  new String[] { "TLSv1.2", "TLSv1.3" },
  null,
  SSLConnectionSocketFactory.getDefaultHostnameVerifier());

CloseableHttpClient httpClient = HttpClients.custom().setSSLSocketFactory(sslsf).build();
Posted by: Guest on August-23-2021

Browse Popular Code Answers by Language