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_11_6-221-ge3c9849


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_2_11_6-221-ge3c9849
Date: Tue, 22 Feb 2011 20:57:27 +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=e3c98490a827a17782434587705be0ee8adaadd3

The branch, master has been updated
       via  e3c98490a827a17782434587705be0ee8adaadd3 (commit)
       via  51c605d67a658f4ae675e1a09eec8e4f218f3fde (commit)
      from  9a24a046b1f5ec92d6fffc27c8da7cb8652f4142 (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 e3c98490a827a17782434587705be0ee8adaadd3
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Tue Feb 22 21:55:58 2011 +0100

    store entities as numbers to avoid issues in big-little endian machines.

commit 51c605d67a658f4ae675e1a09eec8e4f218f3fde
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Tue Feb 22 00:07:15 2011 +0100

    documented the DTLS sequence particularities.

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

Summary of changes:
 lib/gnutls_record.c       |    7 ++++++-
 lib/gnutls_session_pack.c |   24 +++++++++++-------------
 2 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/lib/gnutls_record.c b/lib/gnutls_record.c
index 3f6ea81..5f93fc5 100644
--- a/lib/gnutls_record.c
+++ b/lib/gnutls_record.c
@@ -1312,7 +1312,12 @@ gnutls_record_recv (gnutls_session_t session, void 
*data, size_t data_size)
  *
  * This function is the same as gnutls_record_recv(), except that
  * it returns in addition to data, the sequence number of the data.
- * This is useful in DTLS.
+ * This is useful in DTLS where record packets might be received
+ * out-of-order.
+ *
+ * In DTLS the least significant 48-bits are a unique sequence
+ * number, per handshake. If your application is using TLS re-handshakes
+ * then the full 64-bits should be used as a unique sequence.
  *
  * Returns: the number of bytes received and zero on EOF.  A negative
  *   error code is returned in case of an error.  The number of bytes
diff --git a/lib/gnutls_session_pack.c b/lib/gnutls_session_pack.c
index 1579864..1f4dec1 100644
--- a/lib/gnutls_session_pack.c
+++ b/lib/gnutls_session_pack.c
@@ -766,17 +766,17 @@ pack_security_parameters (gnutls_session_t session, 
gnutls_buffer_st * ps)
   cur_size = ps->length;
 
 
-  BUFFER_APPEND (ps, &session->security_parameters.entity, 1);
-  BUFFER_APPEND (ps, &session->security_parameters.kx_algorithm, 1);
+  BUFFER_APPEND_NUM (ps, session->security_parameters.entity);
+  BUFFER_APPEND_NUM (ps, session->security_parameters.kx_algorithm);
   BUFFER_APPEND (ps,
                  &session->security_parameters.current_cipher_suite.suite[0],
                  1);
   BUFFER_APPEND (ps,
                  &session->security_parameters.current_cipher_suite.suite[1],
                  1);
-  BUFFER_APPEND (ps, &params->compression_algorithm, 1);
-  BUFFER_APPEND (ps, &session->security_parameters.cert_type, 1);
-  BUFFER_APPEND (ps, &session->security_parameters.version, 1);
+  BUFFER_APPEND_NUM (ps, params->compression_algorithm);
+  BUFFER_APPEND_NUM (ps, session->security_parameters.cert_type);
+  BUFFER_APPEND_NUM (ps, session->security_parameters.version);
 
   BUFFER_APPEND (ps, session->security_parameters.master_secret,
                  GNUTLS_MASTER_SIZE);
@@ -813,20 +813,18 @@ unpack_security_parameters (gnutls_session_t session, 
gnutls_buffer_st * ps)
   memset (&session->internals.resumed_security_parameters, 0,
           sizeof (session->internals.resumed_security_parameters));
 
-  BUFFER_POP (ps, &session->internals.resumed_security_parameters.entity, 1);
-  BUFFER_POP (ps,
-              &session->internals.resumed_security_parameters.kx_algorithm,
-              1);
+  BUFFER_POP_NUM (ps, session->internals.resumed_security_parameters.entity);
+  BUFFER_POP_NUM (ps,
+              session->internals.resumed_security_parameters.kx_algorithm);
   BUFFER_POP (ps,
               &session->internals.
               resumed_security_parameters.current_cipher_suite.suite[0], 1);
   BUFFER_POP (ps,
               &session->internals.resumed_security_parameters.
               current_cipher_suite.suite[1], 1);
-  BUFFER_POP (ps, &session->internals.resumed_compression_method, 1);
-  BUFFER_POP (ps, &session->internals.resumed_security_parameters.cert_type,
-              1);
-  BUFFER_POP (ps, &session->internals.resumed_security_parameters.version, 1);
+  BUFFER_POP_NUM (ps, session->internals.resumed_compression_method);
+  BUFFER_POP_NUM (ps, 
session->internals.resumed_security_parameters.cert_type);
+  BUFFER_POP_NUM (ps, session->internals.resumed_security_parameters.version);
 
   BUFFER_POP (ps,
               &session->internals.resumed_security_parameters.master_secret,


hooks/post-receive
-- 
GNU gnutls



reply via email to

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