handshake_failure找不到合适的证书

时间:2018-02-06 07:33:38

标签: java ssl

我正在使用java 8进行ssl连接得到8 RECV TLSv1.2 ALERT:致命,handshake_failure 服务器所有者发送了三个证书文件,我将它们添加到密钥存储区和信任存储区。 使用System.setProperty(“javax.net.ssl.keyStore”,file); System.setProperty(“javax.net.ssl.trustStore”,file); 以下错误是ssl debug output

*** CertificateRequest
Cert Types: RSA, DSS, ECDSA
Supported Signature Algorithms: SHA1withRSA, SHA1withDSA, SHA1withECDSA, SHA256withRSA, SHA256withDSA, SHA256withECDSA, SHA384withRSA, Unknown (hash:0x5, signature:0x2), SHA384withECDSA
Cert Authorities:
<Empty>
main, READ: TLSv1.2 Handshake, length = 4
*** ServerHelloDone

VWarning:找不到合适的证书 - 继续没有客户端身份验证     ***证书链     

感谢任何人都可以提供帮助

1 个答案:

答案 0 :(得分:3)

关键是这里:

Cert Authorities:
     <Empty>

服务器不信任任何人。它有一个空的信任库,或根本没有信任库。客户端只能发送Cert Authorities消息中CertificateRequest信任的证书。没有权限,所以没有客户端证书,所以没有TLS会话。

解决方案:修复服务器信任库。