error:curl: (60) SSL certificate problem: unable to get local issuer certificate

0

I'm trying to connect to a URL from my EC2 server using the curl command: curl -vvv https://xxxxxxxxxxx.com and it is throwing an error:curl: (60) SSL certificate problem: unable to get local issuer certificate. Curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. The SSL certificate has been obtained from a trusted CA because when I open the url in a browser it shows no SSL issues. When I run this command: openssl s_client -connect xxxxxxxxxxxx:443 -showcerts it throws this error Verify return code: 21 (unable to verify the first certificate) as it fails to verify the certificate. I have tried the following things: Checked the local trust store to ensure the root CA needed to validate the server's certificate are present and up-to-date using update-ca-certificates tool Downloaded the latest cacert.pem from https://curl.se/ca/cacert.pem and added the '--cacert /path/to/cacert.pem' option to the curl command to tell curl where the local Certificate Authority file is Add the root CA (the CA signing the server certificate) to /etc/ssl/certs/ca-certificates.crt. What can I do to rectify this issue?

gefragt vor einem Jahr183 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen