你好,我们服务端调用https://mp.weixin.qq.com/cgi-bin/showqrcode,报错了java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target。
查看一下发现是GA证书更新到G2了,我的环境是centos,用tomcat发布的java应用。我将centos中用【update-ca-trust】更新了(ca-bundle.crt),而且在$JAVA_HOME/jre/lib/security中用keytool也添加了。
当我用curl https://mp.weixin.qq.com的时候,已经可行了。但是java应用访问接口,还是报之前的错误,而且重启了tocmat的应用了。这个可能是什么原因呢????