[evolution-data-server/camel-socks-proxy] Reset the SSL handshake after connecting to the SOCKS proxy



commit 881b059cf2441281193bb940cbf5b0e66d03862c
Author: Federico Mena Quintero <federico novell com>
Date:   Wed Jun 2 14:18:00 2010 -0500

    Reset the SSL handshake after connecting to the SOCKS proxy
    
    Apparently it matters whether the socket had been written to,
    while doing the connection to the proxy.  Now it works fine.
    
    Signed-off-by: Federico Mena Quintero <federico novell com>

 camel/camel-tcp-stream-ssl.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/camel/camel-tcp-stream-ssl.c b/camel/camel-tcp-stream-ssl.c
index 3b55c59..818f303 100644
--- a/camel/camel-tcp-stream-ssl.c
+++ b/camel/camel-tcp-stream-ssl.c
@@ -1327,6 +1327,20 @@ connect_to_socks4_proxy (CamelTcpStreamSSL *ssl, const gchar *proxy_host, gint p
 		if (!fd) {
 			d (g_print ("  could not enable SSL\n"));
 			goto error;
+		} else {
+			d (g_print ("  SSL_ResetHandshake\n"));
+			if (SSL_ResetHandshake (fd, FALSE) == SECFailure) {
+				set_errno (PR_GetError ());
+				d (g_print ("  failed\n"));
+				goto error;
+			}
+
+			d (g_print ("  SSL_ForceHandshake\n"));
+			if (SSL_ForceHandshake (fd) == SECFailure) {
+				set_errno (PR_GetError ());
+				d (g_print ("  failed\n"));
+				goto error;
+			}
 		}
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]