gnutls-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-373-g3cc4fbd


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-373-g3cc4fbd
Date: Thu, 23 Sep 2010 21:12:28 +0000

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 "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=3cc4fbdbdcb973972029e98c60597b54c2c0006e

The branch, master has been updated
       via  3cc4fbdbdcb973972029e98c60597b54c2c0006e (commit)
       via  1d55a576b587fadb7576853c6999b35d2599762b (commit)
      from  be59ade6bcdf4d3ea5e30cf14a2d0e2196e4682d (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 3cc4fbdbdcb973972029e98c60597b54c2c0006e
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Thu Sep 23 23:08:55 2010 +0200

    changed the fatality level of some errors.

commit 1d55a576b587fadb7576853c6999b35d2599762b
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Thu Sep 23 22:59:09 2010 +0200

    No longer use is_fatal() during handshake. Explicitely treat
    EAGAIN and INTERRUPTED as non-fatal during handshake. If the check_fatal
    flag is set then GNUTLS_E_WARNING_ALERT_RECEIVED could interrupt
    a handshake as well.

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

Summary of changes:
 lib/gnutls_errors.c    |    8 +++++---
 lib/gnutls_handshake.c |    7 ++++++-
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/lib/gnutls_errors.c b/lib/gnutls_errors.c
index 8e6bd40..88c6035 100644
--- a/lib/gnutls_errors.c
+++ b/lib/gnutls_errors.c
@@ -43,7 +43,9 @@ struct gnutls_error_entry
   const char *desc;
   const char *_name;
   int number;
-  int fatal;
+  int fatal; /* whether this error is fatal and the session for handshake 
+              * should be terminated.
+              */
 };
 typedef struct gnutls_error_entry gnutls_error_entry;
 
@@ -92,7 +94,7 @@ static const gnutls_error_entry error_algorithms[] = {
               GNUTLS_E_NO_CERTIFICATE_FOUND, 1),
 
   ERROR_ENTRY (N_("There is already a crypto algorithm with lower priority."),
-              GNUTLS_E_CRYPTO_ALREADY_REGISTERED, 0),
+              GNUTLS_E_CRYPTO_ALREADY_REGISTERED, 1),
 
   ERROR_ENTRY (N_("No temporary RSA parameters were found."),
               GNUTLS_E_NO_TEMPORARY_RSA_PARAMS, 1),
@@ -140,7 +142,7 @@ static const gnutls_error_entry error_algorithms[] = {
   ERROR_ENTRY (N_("Parsing error in password file."),
               GNUTLS_E_SRP_PWD_PARSING_ERROR, 1),
   ERROR_ENTRY (N_("The requested data were not available."),
-              GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE, 0),
+              GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE, 1),
   ERROR_ENTRY (N_("Error in the pull function."), GNUTLS_E_PULL_ERROR, 1),
   ERROR_ENTRY (N_("Error in the push function."), GNUTLS_E_PUSH_ERROR, 1),
   ERROR_ENTRY (N_
diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c
index b7f1c54..cf3b32f 100644
--- a/lib/gnutls_handshake.c
+++ b/lib/gnutls_handshake.c
@@ -2664,9 +2664,14 @@ gnutls_handshake (gnutls_session_t session)
   return 0;
 }
 
+
 #define IMED_RET( str, ret, check_fatal) do { \
        if (ret < 0) { \
-               if (check_fatal != 0 && gnutls_error_is_fatal(ret)==0) return 
ret; \
+               /* EAGAIN and INTERRUPTED are always non-fatal */ \
+               if (ret == GNUTLS_E_AGAIN || ret == GNUTLS_E_INTERRUPTED) \
+                       return ret; \
+                /* a warning alert might interrupt handshake */ \
+               if (check_fatal != 0 && ret==GNUTLS_E_WARNING_ALERT_RECEIVED) 
return ret; \
                gnutls_assert(); \
                ERR( str, ret); \
                _gnutls_handshake_hash_buffers_clear(session); \


hooks/post-receive
-- 
GNU gnutls



reply via email to

[Prev in Thread] Current Thread [Next in Thread]