The certificate chain issued by an untrusted authority

五迷三道 提交于 2021-01-22 17:50:46

问题


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.


回答1:


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


来源:https://stackoverflow.com/questions/61676185/the-certificate-chain-issued-by-an-untrusted-authority

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!