javax.net.ssl.SSLHandshakeException
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:980) ~[na:1.8.0_45]
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1363) ~[na:1.8.0_45]
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1391) ~[na:1.8.0_45]
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1375) ~[na:1.8.0_45]
at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.kt:351) ~[okhttp-4.2.2.jar:na]
at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.kt:310) ~[okhttp-4.2.2.jar:na]
at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:178) ~[okhttp-4.2.2.jar:na]
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:236) ~[okhttp-4.2.2.jar:na]
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:109) ~[okhttp-4.2.2.jar:na]
解决办法升级jdk版本或者修改jdk文件
1、对于服务器来说要支持域名并且不进行ssl证书校验,需要升级到jdk1.8的201版本及以上
2、修改…\Java\JDK\jre\lib\security目录下java.security文件,添加下面语句到文件内容中文章来源地址https://www.toymoban.com/news/detail-665910.html
#crypto.policy=unlimited
文章来源:https://www.toymoban.com/news/detail-665910.html
到了这里,关于javax.net.ssl.SSLHandshakeException的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!