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



commit 24af912f902a3e484aafe0c3ab1fd623ffc7ea92
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 8ffc1c9..8400c90 100644
--- a/camel/camel-tcp-stream-ssl.c
+++ b/camel/camel-tcp-stream-ssl.c
@@ -1186,6 +1186,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]