16

I just need to fetch an https page, and I'm using curl currently by having the curl.exe application in my Path and calling it with a Perl file. However, then I get the error "* Protocol https not supported or disabled in libcurl". I've been looking around and I can't find a solid set of instructions to get it to work. I have installed cygwin, and OpenSSL-Win32 but something tells me I'm going to have to compile curl from scratch. I have no experience with this. How do you do it?

VolatileRig
  • 2,727
  • 6
  • 32
  • 44

2 Answers2

38

I found the below steps worked well

  1. Download and unzip 64-bit cURL with SSL.
  2. Download the latest bundle of Certficate Authority Public Keys from mozilla.org.
  3. Rename this file from cacert.pem to curl-ca-bundle.crt
  4. Make sure both of them are in the PATH environment.

Test

curl -L https://www.google.com

UPDATE

If you are open to try other tools, I think httpie is also a good alternative.

Aravind Yarram
  • 78,777
  • 46
  • 231
  • 327
  • 2
    thanks so much - this worked fine and dandy for me. I had to use the -k option for the parse cloud tutorial. (On the off chance anybody else uses parse AND is a windows brother) – bharal Dec 12 '12 at 00:02
  • Worked for me using **Cygwin** to clone my private gist repo from GitHub, but at step 3 I had to rename the file to `ca-bundle.crt` and put it in the `/usr/ssl/certs/` directory. – Mickäel A. Nov 09 '13 at 14:42
  • 1
    Your first link now gives a 404. – Joel B Oct 04 '16 at 18:15
6
curl --insecure

If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option.

Aaron Saunders
  • 33,180
  • 5
  • 60
  • 80