Insomnia: `insomnia` request results in "Error: SSL peer..." | while copied `curl` (from insomnia) works

Created on 18 Jun 2020  路  7Comments  路  Source: Kong/insomnia

Describe the bug
Get the following error:

    "Error: SSL peer certificate or SSH remote key was not OK"

When making a request using insomnia while making the same request using curl works (the curl command was copied from insomnia)

To Reproduce
Steps to reproduce the behavior:

  1. setup a get request in insomnia
  2. send the request
  3. returns an error "Error: SSL peer certificate or SSH remote key was not OK"
  4. right click on the request name (in the navigation panel)
  5. select "Copy as Curl"
  6. paste the curl command into the terminal and press enter
  7. observe the curl command succeeds as expected

Expected behavior
Insomnia should be able to make the request as the curl command in the terminal

Screenshots
(can't due to sensitive data)

Desktop (please complete the following information):

  • OS: macOS 10.15.5
  • Installation Method: directly from insomnia.rest
  • App Version Version 2020.2.2 (2020.2.2)

Additional context
All other requests work as expected except to one service (specific internal at work)
The Exact same request worked fine in the previous version of insomnia (can't remember the version number)

apcore

Most helpful comment

Still broken in 2020.4.1

All 7 comments

Having this same problem. According to the log, Insomnia is no longer correctly using my system trusted roots:

* Preparing request to https://localhost:8080/graphql
* Using libcurl/7.69.1 OpenSSL/1.1.1g zlib/1.2.11 brotli/1.0.7 libidn2/2.1.1 libssh2/1.9.0 nghttp2/1.40.0
* Current time is 2020-06-26T01:02:18.443Z
* Disable timeout
* Enable automatic URL encoding
* Enable SSL validation
* Enable cookie sending with jar of 0 cookies
* Hostname in DNS cache was stale, zapped
*   Trying ::1:8080...
* Connection failed
* connect to ::1 port 8080 failed: Connection refused
*   Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080 (#4)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/cert.pem
*   CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Request CERT (13):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (OUT), TLS alert, unknown CA (560):
* SSL certificate problem: unable to get local issuer certificate
* Closing connection 4

This previously worked totally fine; not sure if it's that validation was added or insomnia support for keychain roots was broken in a recent version on OSX.

We're having same problem with a cert issued by internal issuer/authority.
Downgrading to 7.1.1 fixed it.
Both root and issuer certificate are trusted in macOS keychain.

It's broken between 7.1.1 and 2020.2.0 ... presumably by #2223 but I haven't had time to dig in and see what exactly caused the breakage.

FYI: Still broken in 2020.3.3

Still broken in 2020.4.1

I had this issue when using a new certificate from Let's Encrypt. I solved it by regenerating a proper certificate chain by using this very useful website: https://whatsmychaincert.com/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

artoodeeto picture artoodeeto  路  4Comments

claratorres picture claratorres  路  3Comments

slashsbin picture slashsbin  路  4Comments

oliverjanik picture oliverjanik  路  3Comments

Fyb3roptik picture Fyb3roptik  路  4Comments