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_3_0_8-50-g912eda8


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_3_0_8-50-g912eda8
Date: Sun, 11 Dec 2011 10:01:59 +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=912eda8b0468647dafe9ba91d218adf02f0907a9

The branch, master has been updated
       via  912eda8b0468647dafe9ba91d218adf02f0907a9 (commit)
      from  272149db43bd82cbcde5ba366295e9810e5b7701 (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 912eda8b0468647dafe9ba91d218adf02f0907a9
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sun Dec 11 11:04:39 2011 +0100

    If a ticket is sent to client then don't store the session information in 
the session cache.

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

Summary of changes:
 lib/ext/session_ticket.c |    2 ++
 lib/gnutls_handshake.c   |    6 +++---
 lib/gnutls_int.h         |    1 +
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/ext/session_ticket.c b/lib/ext/session_ticket.c
index a08881d..51b21ca 100644
--- a/lib/ext/session_ticket.c
+++ b/lib/ext/session_ticket.c
@@ -658,6 +658,8 @@ _gnutls_send_new_session_ticket (gnutls_session_t session, 
int again)
       p += MAC_SIZE;
 
       data_size = p - data;
+      
+      session->internals.ticket_sent = 1;
     }
   return _gnutls_send_handshake (session, data_size ? bufel : NULL,
                                 GNUTLS_HANDSHAKE_NEW_SESSION_TICKET);
diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c
index 6ab5491..153818e 100644
--- a/lib/gnutls_handshake.c
+++ b/lib/gnutls_handshake.c
@@ -2784,7 +2784,6 @@ _gnutls_handshake_common (gnutls_session_t session)
           && session->security_parameters.entity == GNUTLS_SERVER))
     {
       /* if we are a client resuming - or we are a server not resuming */
-
       ret = _gnutls_recv_handshake_final (session, TRUE);
       IMED_RET ("recv handshake final", ret, 1);
 
@@ -2803,8 +2802,9 @@ _gnutls_handshake_common (gnutls_session_t session)
       ret = _gnutls_send_handshake_final (session, FALSE);
       IMED_RET ("send handshake final", ret, 1);
 
-      /* only store if we are not resuming */
-      if (session->security_parameters.entity == GNUTLS_SERVER)
+      /* only store if we are not resuming a session and we didn't previously 
send a ticket 
+       */
+      if (session->security_parameters.entity == GNUTLS_SERVER && 
session->internals.ticket_sent == 0)
         {
           /* in order to support session resuming */
           _gnutls_server_register_current_session (session);
diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h
index 92acdd2..d4644d9 100644
--- a/lib/gnutls_int.h
+++ b/lib/gnutls_int.h
@@ -659,6 +659,7 @@ typedef struct
   gnutls_buffer_st handshake_hash_buffer;       /* used to keep the last 
received handshake 
                                                  * message */
   unsigned int resumable:1;              /* TRUE or FALSE - if we can resume 
that session */
+  unsigned int ticket_sent:1;            /* whether a session ticket was sent 
*/
   handshake_state_t handshake_state;    /* holds
                                          * a number which indicates where
                                          * the handshake procedure has been


hooks/post-receive
-- 
GNU gnutls



reply via email to

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