我在我的 Java 项目中调用 Web 服务时遇到问题。 Web 服务客户端在 WebSphere 7 中部署的 Java EE 应用程序中运行。SSL 证书链具有 Go Daddy Class 2 证书颁发机构的根证书。我确实在 WebsSphere JVM 文件夹下的 cacerts 文件中看到它,但我一直收到不受信任的证书错误:
java.security.cert.CertPathValidatorException: The certificate issued by OU=Go Daddy Class 2 Certification Authority, O="The Go Daddy Group, Inc.", C=US is not trusted; internal cause is:
java.security.cert.CertPathValidatorException: Certificate chaining error
无法弄清楚为什么会出现此错误,以及如何解决此问题。请帮助我。
- Web 服务在服务器 A 中运行,客户端在我的机器上运行时运行良好,我机器上的 cacerts 包含该根证书。
- 当客户端与 Web 应用程序一起部署到服务器 A 上时,它不起作用。我们检查了 cacerts 文件,它确实包含 go daddy 根证书。
- 当客户端和网络服务部署到其他使用 VeriSign 证书链运行的环境时,它也能正常工作。
谢谢
最佳答案
在我看来,CA 根公钥应该添加到您的信任库中,因为您将服务器用作网络服务客户端而不是网络服务服务器。
在您的管理控制台上,您应该:
Security->SSL certificate and key management->Key stores and certificates-> NodeDefaultTrustStore-> Signer certificates
关于java - 为什么根证书不受 Java 客户端信任,即使它已经在 cacerts keystore 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15928829/