dakrone / dakrone/clj-http

exception message is: General SSLEngine problem - self signed certificate

Open
#538 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Clojure
Stars
1.8k
Forks
410
PR merge metrics
No merged PRs in 30d

Description

error

exception message is: General SSLEngine problem

Same error with or without

                :insecure? true
                :validate-hostnames false

I created a truststore following the steps in
https://github.com/dakrone/clj-http/blob/master/SSL.org
(Idid not add root.pem to the truststore qlik.ks . (curl, see below, does not use it)

my code

  (client/get "https://myhost:4242/qrs/about"
              {:async? true              
                :insecure? true
;;              :validate-hostnames false
               :accept :json
               :follow-redirects true
               :debug true
               :query-params {"xrfkey" "0123456789abcdef"}
               :headers {"x-qlik-xrfkey" "0123456789abcdef" "X-Qlik-User" "UserDirectory=internal;UserId=sa_repository"}
               ;; :trust-store "truststore.pfx"
               :trust-store "qlik.ks"
               ;:trust-store-type "pkcs12"
               :trust-store-pass "changeit"}
               ;; respond callback
               (fn [response] (println "response is:" response))
               ;; raise callback
               (fn [exception] (println "exception message is: " (.getMessage exception))))

debug

Request: nil
{:user-info nil,
:follow-redirects true,
:use-header-maps-in-response? true,
:body-type nil,
:debug true,
:trust-store "qlik.ks",
:trust-store-pass "changeit",
:headers
{"x-qlik-xrfkey" "0123456789abcdef",
"X-Qlik-User" "UserDirectory=internal;UserId=sa_repository",
"accept-encoding" "gzip, deflate"},
:server-port 4242,
:unknown-host-respond
#object[qlik.sense_api$_main$fn__2957 0x151732fb "qlik.sense_api$_main$fn__2957@151732fb"],
:url
"https://myhost:4242/qrs/about",
:flatten-nested-keys (:query-params),
:uri "/qrs/about",
:server-name "myhost",
:query-string "xrfkey=0123456789abcdef",
:body nil,
:scheme :https,
:async? true,
:request-method :get}
HttpRequest:
{:config nil,
:method "GET",
:requestLine
#object[org.apache.http.message.BasicRequestLine 0x1ad9b8d3 "GET https://ec2amaz-58gvsn3.datamanagement.pirelli.com:4242/qrs/about?xrfkey=0123456789abcdef HTTP/1.1"],
:aborted false,
:params
#object[org.apache.http.params.BasicHttpParams 0x4d464510 "[parameters={}]"],
:protocolVersion
#object[org.apache.http.HttpVersion 0x77724cbe "HTTP/1.1"],
:URI
#object[java.net.URI 0x16d07cf3 "https://ec2amaz-58gvsn3.datamanagement.pirelli.com:4242/qrs/about?xrfkey=0123456789abcdef"],
:class org.apache.http.client.methods.HttpGet,
:allHeaders
[#object[org.apache.http.message.BasicHeader 0x1b57c345 "Connection: close"],
#object[org.apache.http.message.BasicHeader 0x2a8b33ba "x-qlik-xrfkey: 0123456789abcdef"],
#object[org.apache.http.message.BasicHeader 0x4e8b357d "X-Qlik-User: UserDirectory=internal;UserId=sa_repository"],
#object[org.apache.http.message.BasicHeader 0x2e1eb85f "accept-encoding: gzip, deflate"]]}

works with curl

it works if I run

curl --cert ./client.pem --insecure --key ./client_key.pem https://myhost:4242/qrs/about?xrfkey=0123456789abcdef --header "x-qlik-xrfkey: 0123456789abcdef" --header "X-Qlik-User: UserDirectory=internal;UserId=sa_repository" -v

https://help.qlik.com/en-US/sense-developer/February2020/Subsystems/RepositoryServiceAPI/Content/Sense_RepositoryServiceAPI/RepositoryServiceAPI-Example-Connect-cURL-Certificates.htm

My environment

  • Linux Debian testing x64
  • Clojure 1.10.1
  • openjdk version "1.8.0_252-ea"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the reported client/get call and compare its trust-store and certificate options with the working curl command and the SSL.org instructions linked in the issue. Reproduce the General SSLEngine problem on the stated Java and Debian environment; done means the certificate-handling behavior is understood and the reported failure is fixed or clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure, java
Domain
api, backend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.