X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fgnutls.c;h=4f0fa962537b304c7766947c12c29a0c13e77795;hp=0499a2502c742109ab78d513df44e596996b2ec5;hb=320cfdcb658e8d6556ae9dfd902c2db1db866a6b;hpb=695f11304b30ae3d29e5d8c9bc256f8f524bbd61 diff --git a/src/gnutls.c b/src/gnutls.c index 0499a250..4f0fa962 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -442,6 +442,12 @@ ssl_connect_wget (int fd, const char *hostname) case secure_protocol_tlsv1: err = gnutls_priority_set_direct (session, "NORMAL:-VERS-SSL3.0", NULL); break; + case secure_protocol_pfs: + err = gnutls_priority_set_direct (session, "PFS", NULL); + if (err != GNUTLS_E_SUCCESS) + /* fallback if PFS is not available */ + err = gnutls_priority_set_direct (session, "NORMAL:-RSA", NULL); + break; default: abort (); } @@ -520,8 +526,7 @@ ssl_connect_wget (int fd, const char *hostname) break; } - if (err <= 0) - break; + err = GNUTLS_E_AGAIN; } else if (err < 0) { @@ -537,7 +542,7 @@ ssl_connect_wget (int fd, const char *hostname) } } } - while (err == GNUTLS_E_WARNING_ALERT_RECEIVED && gnutls_error_is_fatal (err) == 0); + while (err && gnutls_error_is_fatal (err) == 0); if (opt.connect_timeout) {