From d031dacd27bf9308a58b19a03b5f5f540be5e17f Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Thu, 27 Mar 2003 15:01:18 +0000 Subject: fixes for MandrakeClub: - don't verify peer's certificate (-k option of commandline curl) - allow following locations (allow HTTP redirections) - don't check for hostname before sending authentication (allow HTTP redirection needing authentication to another host) --- grpmi/curl_download/curl_download.xs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'grpmi') diff --git a/grpmi/curl_download/curl_download.xs b/grpmi/curl_download/curl_download.xs index 2aef858a..288982f9 100644 --- a/grpmi/curl_download/curl_download.xs +++ b/grpmi/curl_download/curl_download.xs @@ -106,6 +106,13 @@ char * download_url_real(char * url, char * location, char * proxy, char * proxy curl_easy_setopt(curl, CURLOPT_NOPROGRESS, FALSE); curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, my_progress_func); + /* needed for "insecure" SSL accesses (don't verify the peer's certificate) */ + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE); + /* allow Location: to be followed (needed for MandrakeClub) */ + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, TRUE); + /* when following Location:, allow to still send user+password when hostname changed (needed for Club) */ + curl_easy_setopt(curl, CURLOPT_NO_HOSTNAME_CHECK_BEFORE_AUTHENTICATION, TRUE); + if (proxy && strcmp(proxy, "")) curl_easy_setopt(curl, CURLOPT_PROXY, proxy); if (proxy_user && strcmp(proxy_user, "")) -- cgit v1.2.1