【发布时间】:2011-10-02 14:58:30
【问题描述】:
我正在尝试使用 HttpsURLConnection 与网站建立 HTTPS 连接,然后执行 PUT 请求。当我尝试从HttpsURLConnection.getOutputStream() 创建OutputStreamWriter 时,会抛出以下异常:
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
该页面刚刚获得其证书(由 StartCom 颁发) - 我是否需要手动执行某些操作以使 Java 识别该证书现在存在?我可以毫无困难地连接到同一网站的其他页面,但它们的证书不同。
【问题讨论】:
标签: java https http-put sslhandshakeexception