Java/Clojure中SSL无法访问的证书路径

fif*_*uri 9 java security validation ssl clojure

http-kit在Clojure中使用,当访问https://页面时,我得到unable to find valid certification path to requested target:

:cause unable to find valid certification path to requested target
 :via
 [{:type javax.net.ssl.SSLHandshakeException
   :message General SSLEngine problem
   :at [sun.security.ssl.Handshaker checkThrown Handshaker.java 1375]}
  {:type javax.net.ssl.SSLHandshakeException
   :message General SSLEngine problem
   :at [sun.security.ssl.Alerts getSSLException Alerts.java 192]}
  {:type sun.security.validator.ValidatorException
   :message PKIX path building failed: sun.security.provider.certpath.SunCertPathBui
lderException: unable to find valid certification path to requested target
   :at [sun.security.validator.PKIXValidator doBuild PKIXValidator.java 387]}
  {:type sun.security.provider.certpath.SunCertPathBuilderException
   :message unable to find valid certification path to requested target
   :at [sun.security.provider.certpath.SunCertPathBuilder build SunCertPathBuilder.j
ava 145]}]
Run Code Online (Sandbox Code Playgroud)

我试图找到一个简单的解决方案,我看到有建议以编程方式解决它.是不是有一些简单的方法,我只是想得到一个网页.我甚至不关心这种情况下的安全性.我可以让java放松一下吗?

谢谢你的建议..

mac*_*mac 5

http/get需要"不安全吗?" 选项:

@(http/get "http://gombaszog.sk" {:insecure? true})
Run Code Online (Sandbox Code Playgroud)

  • 这有助于,谢谢,还发现了如何在 Java 中正确修复证书,以及如何在 Clojure 中使其更简单。https://github.com/aphyr/less-awful-ssl 和 https://www.lvh.io/posts/https-requests-with-client-certificates-in-clojure.html 用于“{:insecure”的情况? true}` 不是一种方式。 (3认同)