gnutls: do not fail on non-fatal handshake errors

Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685402
This commit is contained in:
Alessandro Ghedini 2012-08-20 16:47:48 +02:00 коммит произвёл Daniel Stenberg
Родитель 1b0477a5a9
Коммит ee3551e45e
1 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

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