Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Certificate path unreachable for SSL in Java/Clojure

I'm using http-kit in Clojure and when accessing an https:// page I get 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]}]

I tried to find a simple solution, and I see that there are recommendations to solve it programatically. Isn't there some simple way, I just want to get a web page. I even do not care about the security in this case. Can I make java to relax this?

Thanks for suggestions..

like image 241
fifigyuri Avatar asked Jul 08 '15 19:07

fifigyuri


1 Answers

http/get takes an "insecure?" option:

@(http/get "http://gombaszog.sk" {:insecure? true})
like image 187
mac Avatar answered Oct 03 '22 17:10

mac