Curl on Windows and SSL

Posted on 2014-08-20
Last Modified: 2014-08-20
I am trying to get the following to work using curl, but it does not work

C:\curl>curl -H "Content-Type: application/json" -d @input3.txt
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here:

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

I am on a Windows system ysing curl

On another thread, an expert suggested that I download the .pem file and save somewhere and add it to my curl invocation as follows

--cacert path_to_file/cacert.pem

My question:  Where can I download the .pem file, and what is its full name (I am guessing its not cacert.pem, but not really sure)

Question by:Anthony Lucia
    1 Comment
    LVL 58

    Accepted Solution

    I gave you the link in other question. Save this file to your pc

    Add this to your curl command replacing path_to_file with the path where you saved the above file.
    --cacert path_to_file/cacert.pem

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Live - One-on-One Java Help from Top Experts

    Solve your toughest problems, fast.
    Java experts are online now and ready to help you.

    This story has been written with permission from the scammed victim, a valued client of mine – identity protected by request.
    Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
    The viewer will learn how to implement Singleton Design Pattern in Java.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now