证书链接错误:PKIX路径验证失败
问题描述:
我经常遇到异常。在信任存储区:(证书链错误java.security.cert.CertPathValidatorException)请指教该怎么做..证书链接错误:PKIX路径验证失败
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)
答
非常普通的错误,可能还有一些证书丢失。
请包括更多关于你在做什么的信息。
答
也许你的smtp服务器正在使用链接证书,并且你只导入链中的最后一个。您必须将作为签署者的路径中的所有证书添加到信任库中。检查这个帖子Certificate chaining error in Websphere,它提供了一些额外的信息,如何将证书添加到信任库。
请编辑问题以包含一些代码和/或解释发生错误时您要做的事情。 – m69