From 917a5c435d1528e18f3eb7caf8d0371cd2cf8e9d Mon Sep 17 00:00:00 2001 From: Mark Janssen Date: Fri, 13 Apr 2007 08:54:13 +0000 Subject: [PATCH] revert last patch, I had NTLM working with r154, this broke again with 155 git-svn-id: https://proxytunnel.svn.sourceforge.net/svnroot/proxytunnel/trunk/proxytunnel@157 bc163920-b10d-0410-b2c5-a5491ca2ceef --- CHANGES | 1 + http.c | 10 ++-------- proxytunnel.c | 1 - proxytunnel.h | 1 - ptstream.c | 5 +---- 5 files changed, 4 insertions(+), 14 deletions(-) diff --git a/CHANGES b/CHANGES index 1a27f39..bcbfa47 100755 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,6 @@ Changes to proxytunnel version 1.7.1 -- Thu Apr 12 13:40:27 CEST 2007 +- Cygwin SO_REUSEPORT stuff by Marc Heuse - Fix some string-handling related core-dumps - NTLM/SSL fixes by Taco IJsselmuiden - NTLM fixes by Taco IJsselmuiden diff --git a/http.c b/http.c index ae28418..303f6bd 100644 --- a/http.c +++ b/http.c @@ -116,7 +116,7 @@ void proxy_protocol(PTSTREAM *pts) /* * Create the proxy CONNECT command into buf */ - if (args_info.remproxy_given && !connected_with_remote_proxy) + if (args_info.remproxy_given ) { if( args_info.verbose_flag ) message( "Tunneling to %s (remote proxy)\n", args_info.remproxy_arg ); @@ -183,19 +183,13 @@ void proxy_protocol(PTSTREAM *pts) analyze_HTTP(pts); - if (args_info.remproxy_given && !connected_with_remote_proxy) + if (args_info.remproxy_given ) { - connected_with_remote_proxy = 1; /* * Clean buffer for next analysis */ while ( strcmp( buf, "\r\n" ) != 0 ) readline(pts); -#ifdef USE_SSL - if (args_info.encrypt_flag ) - stream_enable_ssl(pts); -#endif - if( args_info.verbose_flag ) message( "Tunneling to %s (destination)\n", args_info.dest_arg ); sprintf( buf, "CONNECT %s HTTP/1.0\r\n", args_info.dest_arg ); diff --git a/proxytunnel.c b/proxytunnel.c index 13764a3..c76a2cc 100644 --- a/proxytunnel.c +++ b/proxytunnel.c @@ -289,7 +289,6 @@ void do_daemon() #endif /* Open the tunnel */ - connected_with_remote_proxy = 0; proxy_protocol(stunnel); /* If --encrypt is specified, wrap all traffic after the proxy handoff in SSL */ diff --git a/proxytunnel.h b/proxytunnel.h index 37c58bc..2a2d243 100644 --- a/proxytunnel.h +++ b/proxytunnel.h @@ -43,7 +43,6 @@ int read_fd; /* The file descriptor to read from */ int write_fd; /* The file destriptor to write to */ char *program_name; /* Guess what? */ int i_am_daemon; /* Also... */ -int connected_with_remote_proxy; PTSTREAM *stunnel; /* The stream representing the socket from us to the proxy */ PTSTREAM *std; /* The stream representing stdin/stdout */ diff --git a/ptstream.c b/ptstream.c index 595cb6f..fd8ede3 100644 --- a/ptstream.c +++ b/ptstream.c @@ -187,10 +187,7 @@ int stream_enable_ssl(PTSTREAM *pts) SSL_METHOD *meth; SSL *ssl; SSL_CTX *ctx; - - if ( pts->ssl != NULL ){ - return 1; - } + /* Initialise the connection */ SSLeay_add_ssl_algorithms(); meth = SSLv23_client_method();