2015-07-08 4 views
7

मैं Clojure में http-kit उपयोग कर रहा हूँ और जब एक https:// पेज तक पहुँचने मैं unable to find valid certification path to requested target मिलती है:प्रमाणपत्र पथ जावा/Clojure में एसएसएल के लिए नहीं पहुंचा जा सकता

: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]}] 

मैं एक सरल समाधान खोजने की कोशिश की, और मैं देखते हैं कि देखने इसे प्रोग्रामिक रूप से हल करने के लिए सिफारिशें। क्या कोई आसान तरीका नहीं है, मैं बस एक वेब पेज प्राप्त करना चाहता हूं। मुझे इस मामले में सुरक्षा की भी परवाह नहीं है। क्या मैं इसे आराम करने के लिए जावा बना सकता हूं?

सुझाव के लिए धन्यवाद ..

+0

आप किस https पृष्ठ तक पहुंचने का प्रयास कर रहे हैं? –

+0

@DanielCompton, यह https://www.gombaszog.sk/ – fifigyuri

+0

मैं कोई कोड प्रदान नहीं कर सकता (और इसलिए इसे उत्तर के रूप में पोस्ट नहीं किया जाएगा), लेकिन क्लाइंट प्रमाणपत्रों के साथ [https अनुरोधों के सटीक विषय पर एक हालिया लेख है) क्लोजर में] (https://www.lvh.io/posts/https-requests-with-client-certificates-in-clojure.html) जो मदद की हो सकती है या हो सकती है। – schaueho

उत्तर

5

http/प्राप्त एक लेता है "असुरक्षित?" विकल्प:

@(http/get "http://gombaszog.sk" {:insecure? true}) 
+1

इससे मदद मिली, धन्यवाद, जावा में प्रमाणपत्रों को सही तरीके से कैसे ठीक किया जाए, और क्लोजर में इसे आसान कैसे बनाया जाए। https://github.com/aphyr/less-awful-ssl और https://www.lvh.io/posts/https-requests-with-client-certificates-in-clojure.html मामलों के लिए जब {{: असुरक्षित ? सच} 'एक रास्ता नहीं है। – fifigyuri

संबंधित मुद्दे