cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem using FTPS through HTTP Proxy (crash in cURL library)

From: Robert Gonzalez <robertgc_at_gmail.com>
Date: Wed, 13 Sep 2006 12:46:15 +0200

On 9/13/06, Armel Asselin <asselin.armel_at_wanadoo.fr> wrote:
> > Ok, the patch from Marcos Rotcha works for me perfectly. Send and
> > receive files without any problem. :)
> no more problems... but no more _data_ encryption ?

I sniff the connection between curl and proxy, and all traffic is
encrypted except "HTTP CONNECT".

The old patch have too many braces and generated a error. This is the new one.
---------------------------------------------------------------------------------------------------------
--- sendf.c 2006-09-13 12:21:38.000000000 +0200
+++ curl-7.15.5/lib/sendf.c 2006-09-13 11:22:40.000000000 +0200
@@ -324,7 +324,7 @@
   CURLcode retcode;
   int num = (sockfd == conn->sock[SECONDARYSOCKET]);

- if (conn->ssl[num].use)
+ if (conn->ssl[num].use && conn->ssl[num].handle != 0)
     /* only TRUE if SSL enabled */
     bytes_written = Curl_ssl_send(conn, num, mem, len);
   else {
@@ -452,7 +452,7 @@

   *n=0; /* reset amount to zero */

- if(conn->ssl[num].use) {
+ if (conn->ssl[num].use && conn->ssl[num].handle != 0) {
     nread = Curl_ssl_recv(conn, num, buf, buffersize);

     if(nread == -1)
Received on 2006-09-13