[git] GnuPG - branch, master, updated. gnupg-2.1.0-beta442-9-g5bf0452

by Werner Koch cvs at cvs.gnupg.org
Fri Jun 13 19:37:26 CEST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  5bf04522e353675e4c3eda118fee2580756704a2 (commit)
      from  d8314e31c58ea0827d0e2361dabcdf869ab08fce (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5bf04522e353675e4c3eda118fee2580756704a2
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Jun 13 19:39:48 2014 +0200

    http: Print human readable GNUTLS status.
    
    * common/http.c (send_gnutls_bye): Take care of EAGAIN et al.
    (http_verify_server_credentials): Print a human readable status.

diff --git a/common/http.c b/common/http.c
index 4fc89d7..06461db 100644
--- a/common/http.c
+++ b/common/http.c
@@ -2419,8 +2419,21 @@ static void
 send_gnutls_bye (void *opaque)
 {
   gnutls_session_t tls_session = opaque;
+  int ret;
 
-  gnutls_bye (tls_session, GNUTLS_SHUT_RDWR);
+ again:
+  do
+    ret = gnutls_bye (tls_session, GNUTLS_SHUT_RDWR);
+  while (ret == GNUTLS_E_INTERRUPTED);
+  if (ret == GNUTLS_E_AGAIN)
+    {
+      struct timeval tv;
+
+      tv.tv_sec = 0;
+      tv.tv_usec = 50000;
+      my_select (0, NULL, NULL, NULL, &tv);
+      goto again;
+    }
 }
 #endif /*HTTP_USE_GNUTLS*/
 
@@ -2486,6 +2499,19 @@ http_verify_server_credentials (http_session_t sess)
   else if (status)
     {
       log_error ("%s: status=0x%04x\n", errprefix, status);
+#if GNUTLS_VERSION_NUMBER >= 0x030104
+      {
+        gnutls_datum_t statusdat;
+
+        if (!gnutls_certificate_verification_status_print
+            (status, GNUTLS_CRT_X509, &statusdat, 0))
+          {
+            log_info ("%s: %s\n", errprefix, statusdat.data);
+            gnutls_free (statusdat.data);
+          }
+      }
+#endif /*gnutls >= 3.1.4*/
+
       sess->verify.status = status;
       if (!err)
         err = gpg_error (GPG_ERR_GENERAL);

-----------------------------------------------------------------------

Summary of changes:
 common/http.c |   28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list