【发布时间】:2012-10-18 18:43:40
【问题描述】:
又是 SSLPeerUnverified 的沉闷问题,但我没有使用自签名证书。 我尝试使用 https 连接到主机。此主机具有正确的证书,Firefox 和 HttpsUrlConnection 都没有任何问题。 但是尝试使用 HttpClient 进行连接时,我得到了可怕的异常。
有什么线索吗?或者提示在哪里可以看得更近?
谢谢!
编辑:调试输出
main,处理异常:
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
main,getSession() 中的 IOException:
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
【问题讨论】:
标签: java httpclient