使用apache客户端和rest模板发送Https连接问题

问题描述 投票:1回答:1

我尝试了stackoverflow中提到的所有解决方案,但似乎没有任何工作。我需要一些精确的解决方案来解决这个问不要标记已经回答或重复,因为我已经厌倦了google和stackoverflow中提到的所有解决方案

2018-05-17 11:42:10,981 main DEBUG LoggerContext[name=15d56d5, org.apache.logging.log4j.core.LoggerContext@110e3b5] started OK.
trustStore is: C:\Prasad\Softwares\jdk1.7.0_79\jre\lib\security\cacerts
trustStore type is : jks
trustStore provider is : 
init truststore
SunX509: skip default keystore: java.security.KeyStoreException: jks not found
trigger seeding of SecureRandom
done seeding SecureRandom
keyStore is : 
keyStore type is : jks
keyStore provider is : 
init keystore

main, WRITE: TLSv1 Handshake, length = 107
main, received EOFException: error
main, handling exception: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
main, SEND TLSv1 ALERT:  fatal, description = handshake_failure
main, WRITE: TLSv1 Alert, length = 2
main, called closeSocket()
Exception in thread "main" org.springframework.web.client.ResourceAccessException: I/O error on GET request for "some url": Remote host closed connection during handshake; nested exception is javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:666)
    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:613)
    at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:531)
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
java rest
1个回答
0
投票
  • 默认情况下,Java 1.6不支持TLSv2。 Oracle后来发布了对它的支持,但它并未对公众开放。
  • Java 1.7中的问题与2009年发布时一样。后来oracle发布了对它的支持,并向公众开放。
  • Java 1.8默认支持Tslv2。
© www.soinside.com 2019 - 2024. All rights reserved.