System.setProperty("javax.net.ssl.trustStore", "C:/tasks/MIP/Cert/ccc_acp.keystore");
System.setProperty("javax.net.ssl.trustStorePassword", "password");
System.setProperty("javax.net.debug", "ssl");
已经设置了信任库,但是调用https时,仍然有错误
javax.net.ssl.SSLHandshakeException:收到致命警报:handshake_failure
整个错误信息很长,错误信息的最后一部分引用如下
main, WRITE: TLSv1 Change Cipher Spec, length = 1
*** Finished verify_data: { 204, 151, 145, 147, 7, 73, 205, 158, 73, 238, 129, 8 }
main,WRITE:TLSv1 Handshake,长度 = 32
main,READ:TLSv1 Alert,length = 2
main,RECV TLSv1 ALERT:致命,handshake_failure
main,调用 closeSocket()
main,处理异常:javax.net.ssl.SSLHandshakeException:收到致命警报:handshake_failure java.lang.Exception: ; 嵌套异常是:javax.net.ssl.SSLHandshakeException:收到致命警报:handshake_failure