[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 298
  • Last Modified:

https, google., and curl

I performed the following https request using curl onto google:

C:\curl>curl -H "Content-Type: application/json" -d @input3.txt https://www.goog
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

Open in new window

What is the easiest way to get this to work ?

Anthony Lucia
Anthony Lucia
  • 2
1 Solution
What server are you on?
You will probably need to change paths to

You can then use this to get the bundle
wget http://curl.haxx.se/ca/cacert.pem

But you need to know the path that is being used.
Anthony LuciaAuthor Commented:
I am on a Windows server (2008)
Download the .pem file and save somewhere.

Add to your curl line

--cacert path_to_file/cacert.pem

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now