当我们使用httpclient连接远程的https服务的时候,我们可以将对方的证书导入到我们本地环境内,导入后即可访问对方的https网址了。
keytool -import -file xxxx.cer -alias paypalm -keystore cacerts.jks -storepass xxxx
但是我碰到了这个错误
keytool -import -file xxxx.cer -alias paypalm -keystore cacerts.jks -storepass xxxx
但是我碰到了这个错误
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderExcept ion: unable to find valid certification path to requested target at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1611) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:187) at com.sun.net.ssl.i