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?

질문됨 일 년 전183회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠