The certificate chain issued by an untrusted authority

8

I am using the curl terminal and while issuing the following command :-

curl --anyauth --user admin:admin "https://localhost:8000/LATEST/search?q=caesar"

I am getting below alert :-

curl: (77) schannel: next InitializeSecurityContext failed: SEC_E_UNTRUSTED_ROOT (0x80090325) - The certificate chain was issued by an authority that is not trusted.

Please suggest. I have installed curl in Windows and also downloaded the .pem file and placed it in the same folder.

ssl
curl
marklogic
asked on Stack Overflow May 8, 2020 by Aviator • edited May 8, 2020 by Mads Hansen

1 Answer

20

If your server has a self-signed cert, then by default curl doesn't know that it can trust that the server is who it says it is, and doesn't want to talk.

You can either:

  • import the cert into your trust store (best and most secure)
  • apply the -k or --insecure switch to ignore and continue. This may be fine for local development.
  • use a real cert, signed by a trusted CA
answered on Stack Overflow May 8, 2020 by Mads Hansen

User contributions licensed under CC BY-SA 3.0