]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Curl_setopt: disallow CURLOPT_USE_SSL without SSL support
authorDaniel Stenberg <daniel@haxx.se>
Thu, 14 Oct 2010 20:33:20 +0000 (22:33 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 14 Oct 2010 20:33:20 +0000 (22:33 +0200)
In order to avoid for example the pingpong protocols to issue STARTTLS
(or equivalent) even though there's no SSL support built-in.

Reported by: Sune Ahlgren
Bug: http://curl.haxx.se/mail/archive-2010-10/0045.html

lib/url.c

index 1b65a923f76c8efc8ca9c7513ee9c7d0610f5265..b0a348b88749c285a87535da63d50c40b2eafec6 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -2166,13 +2166,14 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
     data->set.max_filesize = va_arg(param, long);
     break;
 
+#ifdef USE_SSL
   case CURLOPT_USE_SSL:
     /*
      * Make transfers attempt to use SSL/TLS.
      */
     data->set.ftp_ssl = (curl_usessl)va_arg(param, long);
     break;
-
+#endif
   case CURLOPT_FTPSSLAUTH:
     /*
      * Set a specific auth for FTP-SSL transfers.