证书链错误:PKIX路径验证失败

时间:2015-10-17 02:04:35

标签: ssl smtp websphere ssl-certificate javax.mail

我经常遇到异常情况。请告知该怎么做..

javax.mail.MessagingException: Can't send command to SMTP host;
  nested exception is:
    javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.j: PKIX path validation failed: java.security.cert.CertPathValidatorException: Fail to verify issuer; internal cause is: 
    java.security.cert.CertPathValidatorException: Certificate chaining error
    at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1564)
    at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1551)
    at com.sun.mail.smtp.SMTPTransport.ehlo(SMTPTransport.java:935)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:426)
    at javax.mail.Service.connect(Service.java:288)
    at javax.mail.Service.connect(Service.java:169)

2 个答案:

答案 0 :(得分:0)

非常一般的错误,可能是信任库中缺少某些证书(java.security.cert.CertPathValidatorException:证书链错误)。

请提供有关您正在做的事情的更多信息。

答案 1 :(得分:0)

您的smtp服务器可能正在使用链式证书,而您只导入链中的最后一个。您必须将签名者添加到信任库中路径中的所有证书。查看此帖子Certificate chaining error in Websphere,它提供了一些如何将证书添加到信任库的其他信息。

相关问题