summaryrefslogtreecommitdiffstats
path: root/src/download.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2013-03-06 11:11:33 +0100
committerGravatar Martin Szulecki2013-03-06 11:11:33 +0100
commita1b1122cc5d209681e7c1dc87691854c9e36c117 (patch)
tree414c646b5a9d874270984cc0323a9773f83a2cf0 /src/download.c
parent2784e3b83ab9ed895be992ce1599c715b6f45970 (diff)
downloadidevicerestore-a1b1122cc5d209681e7c1dc87691854c9e36c117.tar.gz
idevicerestore-a1b1122cc5d209681e7c1dc87691854c9e36c117.tar.bz2
Disable SSL verification to allow downloads from untrusted https locations
Diffstat (limited to 'src/download.c')
-rw-r--r--src/download.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/download.c b/src/download.c
index 717f2dc..aa4c61a 100644
--- a/src/download.c
+++ b/src/download.c
@@ -64,6 +64,9 @@ int download_to_buffer(const char* url, char** buf, uint32_t* length)
if (idevicerestore_debug)
curl_easy_setopt(handle, CURLOPT_VERBOSE, 1);
+ /* disable SSL verification to allow download from untrusted https locations */
+ curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0);
+
curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, (curl_write_callback)&download_write_buffer_callback);
curl_easy_setopt(handle, CURLOPT_WRITEDATA, &response);
curl_easy_setopt(handle, CURLOPT_USERAGENT, "InetURL/1.0");
@@ -122,6 +125,9 @@ int download_to_file(const char* url, const char* filename, int enable_progress)
if (idevicerestore_debug)
curl_easy_setopt(handle, CURLOPT_VERBOSE, 1);
+ /* disable SSL verification to allow download from untrusted https locations */
+ curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0);
+
curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, NULL);
curl_easy_setopt(handle, CURLOPT_WRITEDATA, f);