[SCM] GNU gnutls branch, gnutls_3_0_x-2, updated. gnutls_3_0_20-32-gd970452

"Nikos Mavrogiannopoulos" <[email protected]>
Newsgroups gmane.comp.encryption.gpg.gnutls.cvs
Message-ID <[email protected]>
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=d970452ef4754349efa351c0fff660127c60eee9

The branch, gnutls_3_0_x-2 has been updated
       via  d970452ef4754349efa351c0fff660127c60eee9 (commit)
       via  d2e9c28db1e26f296789af6c7bad176cfda708fc (commit)
      from  b9762f94d922d3afe37682ff9bd74906c7d1e106 (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 d970452ef4754349efa351c0fff660127c60eee9
Author: Nikos Mavrogiannopoulos <[email protected]>
Date:   Sat Jun 30 18:37:39 2012 +0200

    documented update

commit d2e9c28db1e26f296789af6c7bad176cfda708fc
Author: David Woodhouse <[email protected]>
Date:   Sat Jun 30 00:07:49 2012 +0100

    Return GNUTLS_E_LARGE_PACKET instead of truncating when sending DTLS record
    
    Signed-off-by: Nikos Mavrogiannopoulos <[email protected]>

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

Summary of changes:
 NEWS                |    3 +++
 lib/gnutls_record.c |    9 ++++++++-
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index 7b889ed..b0f0469 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,9 @@ See the end for copying conditions.
 
 * Version 3.0.21 (unreleased)
 
+** libgnutls: In DTLS larger to mtu records result to 
+GNUTLS_E_LARGE_PACKET instead of being truncated.
+
 ** libgnutls: gnutls_dtls_get_data_mtu() is more precise. Based
 on patch by David Woodhouse.
 
diff --git a/lib/gnutls_record.c b/lib/gnutls_record.c
index e6250f8..fbb84a1 100644
--- a/lib/gnutls_record.c
+++ b/lib/gnutls_record.c
@@ -384,7 +384,14 @@ _gnutls_send_int (gnutls_session_t session, content_type_t type,
      _gnutls_packet2str (type), type, (int) data_size);
 
   if (data_size > MAX_RECORD_SEND_SIZE(session))
-    send_data_size = MAX_RECORD_SEND_SIZE(session);
+    {
+      if (IS_DTLS(session))
+        {
+          gnutls_assert ();
+          return GNUTLS_E_LARGE_PACKET;
+        }
+      send_data_size = MAX_RECORD_SEND_SIZE(session);
+    }
   else
     send_data_size = data_size;
 


hooks/post-receive
-- 
GNU gnutls
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.