【发布时间】:2011-02-11 06:20:41
【问题描述】:
我正在尝试打印一个 URL(根本不涉及浏览器),但该 URL 当前正在抛出以下内容:
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
我使用 JEditorPane 的 setPage 方法调用 URL,该方法仅将 URL 作为参数。假设我无法更改任何服务器端并且我仍然需要访问此资源,我将如何忽略证书错误(或其他使我达到目标的东西)?
通过浏览器访问此 URL 告诉我该站点不受信任,并询问我是否要继续。
【问题讨论】:
标签: java ssl-certificate