@abhishekhpあなたの質問がアップし、まだであれば。
RestTemplate restTemplate = new RestTemplate();
DefaultHttpClient httpClient = new DefaultHttpClient();
// We're going to try and load and enable TLS version 1.2 standard communication context from JSSE Providers
// This is enabled only for download media Mirakl as some merchants don't accept communication with TLS versions prior to 1.1
try {
SSLContext context;
context = SSLContext.getInstance("TLSv1.2");
context.init(null, null, null);
SSLSocketFactory ssf = new SSLSocketFactory(context);
ClientConnectionManager ccm = httpClient.getConnectionManager();
SchemeRegistry sr = ccm.getSchemeRegistry();
sr.register(new Scheme("http", 80, PlainSocketFactory.getSocketFactory()));
sr.register(new Scheme("https", 443, ssf));
} catch (NoSuchAlgorithmException | KeyManagementException e) {
LOGGER.warn("Could not load the TLS version 1.2 due to => ", e);
}
restTemplate.setRequestFactory(new HttpComponentsClientHttpRequestFactory(httpClient));
TLS 2.0は存在しないため、「サポートする」ことが難しくなります。 –
指摘してくれてありがとうございました。 – Panther