Код: Выделить всё
WebClient client = WebClient
.create(serviceEndPoint,
Collections.singletonList(new JacksonJsonProvider()));
client.path(requestTokenService);
HTTPConduit conduit =
(HTTPConduit) WebClient.getConfig(client).getConduit();
HTTPClientPolicy policy = conduit.getClient();
try {
SSLContext sslContext = SSLContext.getInstance("TLSv1");
sslContext.init(null, null, null);
TLSClientParameters tlsParams = new TLSClientParameters();
tlsParams.setSSLSocketFactory(sslContext.getSocketFactory());
tlsParams.setSecureSocketProtocol("TLSv1");
conduit.setTlsClientParameters(tlsParams);
logger.info("TLS set to 1.0");
} catch (NoSuchAlgorithmException e) {
logger.error("Setting the tls failed with NoSuchAlgorithmException ["+e.getMessage()+"]");
} catch (KeyManagementException e) {
logger.error("Setting the tls failed with KeyManagementException ["+e.getMessage()+"]");
}
policy.setProxyServer(proxyUrl);
policy.setProxyServerPort(proxyPort);
ClientConfiguration config = WebClient.getConfig(client);
config.getInInterceptors().add(new LoggingInInterceptor());
config.getOutInterceptors().add(new LoggingOutInterceptor());
Response response = client.get();
2018 -01-03 05:30:19,207 [eb46095f-71d9-4a3f-98c3-beec8d97dbf5] ОШИБКА
[ServiceClass]
- Сбой сохранения из-за ошибки [javax.net.ssl.SSLHandshakeException: вызов SSLHandshakeException
https:abc.com/thepath:
Сервер выбрал TLSv1, но эта версия протокола не включена или
не поддерживается клиент.]
Здесь будет признательна помощь в том, как включить TLSv1 в этом соединении.
Подробнее здесь: https://stackoverflow.com/questions/480 ... sing-tlsv1
Мобильная версия