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>
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;
+ }
}
}