aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ghedini <al3xbio@gmail.com>2012-08-20 16:47:48 +0200
committerDaniel Stenberg <daniel@haxx.se>2012-09-04 22:11:58 +0200
commitee3551e45e60856eb0b779aa6cd34d77f16208a5 (patch)
tree0f5aa7cd1084d33937b71c81c0ecf6f364564e9d
parent1b0477a5a99412f8c2a3d58b1815487a678beec5 (diff)
gnutls: do not fail on non-fatal handshake errors
Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685402
-rw-r--r--lib/gtls.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/gtls.c b/lib/gtls.c
index c750a6f90..3b4dc40a3 100644
--- a/lib/gtls.c
+++ b/lib/gtls.c
@@ -302,15 +302,17 @@ static CURLcode handshake(struct connectdata *conn,
if(nonblocking)
return CURLE_OK;
}
+ else if((rc < 0) && gnutls_error_is_fatal(rc)) {
+ failf(data, "gnutls_handshake() warning: %s", gnutls_strerror(rc));
+ }
else if(rc < 0) {
failf(data, "gnutls_handshake() failed: %s", gnutls_strerror(rc));
return CURLE_SSL_CONNECT_ERROR;
}
- else {
- /* Reset our connect state machine */
- connssl->connecting_state = ssl_connect_1;
- return CURLE_OK;
- }
+
+ /* Reset our connect state machine */
+ connssl->connecting_state = ssl_connect_1;
+ return CURLE_OK;
}
}