By default, Libcurl does not support HTTPS, and if you use the HTTPS link, the error " Protocol HTTPS not supported or disabled in Libcurl" appears. To see if curl supports HTTPS, you can use the command:
Curl-v.
There are two ways that Curl uses https:
1. Set to No authentication certificate and host
Code = curl_easy_setopt (handle, Curlopt_ssl_verifypeer, 0L);
2. Set up an SSL discriminant certificate
Http://curl.haxx.se/ca/cacert.pem
I don't know how to use these two methods, so I have to use the stupidest way to reload Curl:
1. Download Curl-7.14.0.tar.gz compressed package, many online
2. Unzip: # TAR-ZXVF Curl-7.14.0.tar.gz
# CD curl-7.14.0
#./configure note here that the last message indicates whether HTTPS is supported:
Curl version: 7.14.0 Host setup: x86_64-unknown-linux-gnu Install prefix: /usr/local Compiler: gcc SSL support: no (--with-ssl/--WITH-GNUTLS) zlib support: enabled KRB4 support: no (--with-krb4*) GSSAPI support: no (--WITH-GSSAPI) SPNEGO Support: No (--with-spnego) C-ares support: no (--enable-ares) IPv6 support: enabled IDNs support: enabled Build Libcurl: shared=yes, static=yes built-in manual:enabled Verbose errors : enabled (-- Disable-verbose) SSPI support: no (--ENABLE-SSPI) CA cert path: No
The SSL support prompt here is not supported, because the HTTPS protocol is encrypted security HTTP-based protocol, need to use OpenSSL static library, so need to support https must download OpenSSL, here do not repeat, the method is visible:/http Www.linuxidc.com/Linux/2011-01/31229.htm
# vi/etc/ld.so.conf, in this case join the directory where OpenSSL generated the library file, and use the command Ldconfig to flush the cache.
#./configure--prefix=/usr/local/curl--with-ssl=/usr/local/ssl, note the last piece of information
Curl version: 7.14.0 Host setup: x86_64-unknown-linux-gnu Install prefix: /usr/local Compiler: gcc SSL support: enabled (OpenSSL) zlib support: enabled KRB4 support: No (--with-krb4*) GSSAPI support: no (--WITH-GSSAPI) SPNEGO support: no (--with-spnego) c-ares Support: no (--enable-ares) IPv6 support: enabled IDNs support: enabled Build Libcurl: shared=yes, static=yes built-in manual:enabled Verbose errors : enabled (-- Disable-verbose) SSPI support: no (--ENABLE-SSPI) CA cert path: /usr/local/share/curl/ Curl-ca-bundle.crt
Tip support for OpenSSL has been supported, then make, and make install.
# curl-v
Curl 7.14.0 (X86_64-UNKNOWN-LINUX-GNU) libcurl/7.14.0 openssl/1.0.1e zlib/1.2.3 libidn/1.18protocols:ftp Gopher telnet Dict LDAP http file https FTPs features:idn IPv6 largefile NTLM SSL libz
The hint already supports HTTPS.
Curl does not support HTTPS issues