slightly "hackish" approach to disable SSL during download if the connection
authorDaniel Stenberg <daniel@haxx.se>
Mon, 21 May 2001 13:30:01 +0000 (13:30 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 21 May 2001 13:30:01 +0000 (13:30 +0000)
is a FTPS connection as the data transfer is then done unencrypted!

lib/transfer.c

index 4e20e80aa07b263c0318f8966ca64ca5e49ee50c..3ee2bb8bda06770cc39ba8bd9ffc655555a93bc7 100644 (file)
@@ -866,7 +866,14 @@ CURLcode Curl_perform(CURL *curl)
     if(res == CURLE_OK) {
       res = Curl_do(conn);
       if(res == CURLE_OK) {
+        if(conn->protocol&PROT_FTPS)
+          /* FTPS, disable ssl while transfering data */
+          conn->ssl.use = FALSE;
         res = Transfer(conn); /* now fetch that URL please */
+        if(conn->protocol&PROT_FTPS)
+          /* FTPS, enable ssl again after havving transferred data */
+          conn->ssl.use = TRUE;
+
         if(res == CURLE_OK) {
           /*
            * We must duplicate the new URL here as the connection data