[英]PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target?
I created a local keystore with keytool using java and done ssl configuration in Apache Tomcat. 我使用java使用keytool创建了本地密钥库,并在Apache Tomcat中完成了ssl配置。
I have been installed certificate in my local machine, even added to the jre cacerts as a trustedentry. 我已经在本地计算机上安装了证书,甚至以受信任的方式将证书添加到了jre cacerts中。
opening through browser via https is working fine 通过浏览器通过https打开可以正常工作
But the problem is while trying to access through directory services. 但是问题出在尝试通过目录服务访问时。
error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Finally I got the issue resolved by finding out the correct JRE and adding the certificate as trusted entry. 最后,我通过找到正确的JRE并将证书添加为受信任的条目来解决了该问题。
Working with browser is fine since the browser knows that the certificate is trusted but JRE is dumb in this case.
使用浏览器很好,因为浏览器知道证书是受信任的,但在这种情况下JRE是愚蠢的。 So, need to add the certificate as trusted entry to the
cacerts
keystore of the correct JRE(When we have multiple JREs installed on our system).因此,需要将证书作为受信任条目添加到正确JRE的
cacerts
密钥库中(当我们在系统上安装了多个JRE时)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.