问题
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