我有一个奇怪的问题(这是100%的服务器的配置问题)比如我想从Dropbox的下载东西:Debian的SSL证书错误:无法验证XXX证书/ javax.net.ssl.SSLHandshakeException
Resolving dl.dropboxusercontent.com... 23.23.160.146, 50.17.227.107, 54.221.248.69, ... Connecting to dl.dropboxusercontent.com|23.23.160.146|:443... connected. ERROR: cannot verify dl.dropboxusercontent.com’s certificate, issued by “/C=US/ST=CA/O=SonicWALL Inc./CN=SonicWALL Firewall DPI-SSL”:
Self-signed certificate encountered. To connect to dl.dropboxusercontent.com insecurely, use ‘--no-check-certificate’.
是的,我知道,我可以使用--non检查证书,但是当我想用在Java应用程序的SSL连接我有这样的事情:
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
这个应用在其他的服务器或本地的伟大工程机器,有什么想法这里有什么不对?
有没有可能“信任”每个网页? – user3771297
@ user3771297如果您信任所有证书,将会取消证书的整个概念:)但是,您可能想看看这个http://stackoverflow.com/questions/2893819/telling-java-to-accept -self-signed-ssl-certificate我建议宁可使用你提到的“--no-check-certificate”选项。但是,你确定吗? – Pat
@ user3771297有许多方法可以禁用证书验证,但它们是99.9999999%的时间的可怕想法。它感觉*就像是一种快速的方式,但之后会导致更多的麻烦:您必须在代码投入生产之前将其删除,否则您会忘记并在应用程序中留下安全漏洞(请记住,您在没有解决问题的情况下关闭“警报”,在发布之前很可能不会注意到)。这两种都不是好选择。 – Bruno