aboutsummaryrefslogtreecommitdiff
path: root/lib/nss.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/nss.c')
-rw-r--r--lib/nss.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/nss.c b/lib/nss.c
index 652d9f1f7..ec7815400 100644
--- a/lib/nss.c
+++ b/lib/nss.c
@@ -74,6 +74,8 @@ PRFileDesc *PR_ImportTCPSocket(PRInt32 osfd);
static int initialized = 0;
static int noverify = 0;
+#define HANDSHAKE_TIMEOUT 30
+
typedef struct {
PRInt32 retryCount;
struct SessionHandle *data;
@@ -513,6 +515,12 @@ CURLcode Curl_nss_connect(struct connectdata * conn, int sockindex)
SSL_SetURL(connssl->handle, conn->host.name);
+ /* Force the handshake now */
+ if (SSL_ForceHandshakeWithTimeout(connssl->handle,
+ PR_SecondsToInterval(HANDSHAKE_TIMEOUT))
+ != SECSuccess)
+ goto error;
+
return CURLE_OK;
error: