[Pkg-gnupg-commit] [gnupg2] 60/124: dirmngr: Ignore warning alerts in the GNUTLS handshake.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Apr 5 15:55:33 UTC 2017


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch experimental
in repository gnupg2.

commit 69c521df422a6c9a6b0a93e45c9373a8b6ceb28e
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Mar 17 12:46:09 2017 +0100

    dirmngr: Ignore warning alerts in the GNUTLS handshake.
    
    * dirmngr/http.c (send_request) [GNUTLS]: Don't bail out on warning
    alerts.
    --
    
    GnuPG-bug-id: 2833
    Signed-off-by: Werner Koch <wk at gnupg.org>
---
 dirmngr/http.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dirmngr/http.c b/dirmngr/http.c
index 3adf6e5..04a30d6 100644
--- a/dirmngr/http.c
+++ b/dirmngr/http.c
@@ -1903,6 +1903,7 @@ send_request (http_t hd, const char *httphost, const char *auth,
       gnutls_transport_set_push_function (hd->session->tls_session,
                                           my_gnutls_write);
 
+    handshake_again:
       do
         {
           rc = gnutls_handshake (hd->session->tls_session);
@@ -1918,10 +1919,15 @@ send_request (http_t hd, const char *httphost, const char *auth,
 
               alertno = gnutls_alert_get (hd->session->tls_session);
               alertstr = gnutls_alert_get_name (alertno);
-              log_info ("TLS handshake failed: %s (alert %d)\n",
+              log_info ("TLS handshake %s: %s (alert %d)\n",
+                        rc == GNUTLS_E_WARNING_ALERT_RECEIVED
+                        ? "warning" : "failed",
                         alertstr, (int)alertno);
               if (alertno == GNUTLS_A_UNRECOGNIZED_NAME && server)
                 log_info ("  (sent server name '%s')\n", server);
+
+              if (rc == GNUTLS_E_WARNING_ALERT_RECEIVED)
+                goto handshake_again;
             }
           else
             log_info ("TLS handshake failed: %s\n", gnutls_strerror (rc));

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list