diff options
Diffstat (limited to 'net-misc/wget/files/wget-1.14-gnutls-ssl.patch')
-rw-r--r-- | net-misc/wget/files/wget-1.14-gnutls-ssl.patch | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/net-misc/wget/files/wget-1.14-gnutls-ssl.patch b/net-misc/wget/files/wget-1.14-gnutls-ssl.patch deleted file mode 100644 index 8d5fe81e1b55..000000000000 --- a/net-misc/wget/files/wget-1.14-gnutls-ssl.patch +++ /dev/null @@ -1,68 +0,0 @@ -https://bugs.gentoo.org/479948 - -From ae80fd2ec75fafdbec9895b9d973f2966209d588 Mon Sep 17 00:00:00 2001 -From: mancha <mancha1@hush.com> -Date: Sun, 5 May 2013 07:16:58 +0200 -Subject: [PATCH] gnutls: do not abort on non-fatal alerts during handshake - -Signed-off-by: mancha <mancha1@hush.com> ---- - src/ChangeLog | 6 ++++++ - src/gnutls.c | 25 ++++++++++++++++++++++--- - 2 files changed, 28 insertions(+), 3 deletions(-) - -2013-05-05 mancha <mancha1@hush.com> (tiny change) - - * gnutls.c (ssl_connect_wget): Don't abort on non-fatal alerts - received during handshake. For example, when connecting to servers - using TSL-SNI that send warning-level unrecognized_name alerts. - -diff --git a/src/gnutls.c b/src/gnutls.c -index 769b005..54422fc 100644 ---- a/src/gnutls.c -+++ b/src/gnutls.c -@@ -376,8 +376,9 @@ ssl_connect_wget (int fd, const char *hostname) - { - struct wgnutls_transport_context *ctx; - gnutls_session_t session; -- int err; -+ int err,alert; - gnutls_init (&session, GNUTLS_CLIENT); -+ const char *str; - - /* We set the server name but only if it's not an IP address. */ - if (! is_valid_ip_address (hostname)) -@@ -440,10 +441,28 @@ ssl_connect_wget (int fd, const char *hostname) - return false; - } - -- err = gnutls_handshake (session); -+ /* We don't stop the handshake process for non-fatal errors */ -+ do -+ { -+ err = gnutls_handshake (session); -+ if (err < 0) -+ { -+ logprintf (LOG_NOTQUIET, "GnuTLS: %s\n", gnutls_strerror (err)); -+ if (err == GNUTLS_E_WARNING_ALERT_RECEIVED || -+ err == GNUTLS_E_FATAL_ALERT_RECEIVED) -+ { -+ alert = gnutls_alert_get (session); -+ str = gnutls_alert_get_name (alert); -+ if (str == NULL) -+ str = "(unknown)"; -+ logprintf (LOG_NOTQUIET, "GnuTLS: received alert [%d]: %s\n", alert, str); -+ } -+ } -+ } -+ while (err == GNUTLS_E_WARNING_ALERT_RECEIVED && gnutls_error_is_fatal (err) == 0); -+ - if (err < 0) - { -- logprintf (LOG_NOTQUIET, "GnuTLS: %s\n", gnutls_strerror (err)); - gnutls_deinit (session); - return false; - } --- -1.8.4.3 - |