[SCM] GNU gnutls branch, master, updated. gnutls_3_0_18-19-g4dd4038

"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=4dd4038557f89f3384f3a3246b8601db4fe0fa63

The branch, master has been updated
       via  4dd4038557f89f3384f3a3246b8601db4fe0fa63 (commit)
       via  3c8ddf27dead54f1b406ea4b17c67999489def84 (commit)
       via  56df68691364f1bc0b0809710d575fa285210ece (commit)
       via  ab591d8e381f9808ae5d84bd6bef0cb8ada46b56 (commit)
       via  d4421b9baba6c553e6922798cb0448485217be98 (commit)
       via  720f2a971f2c75459c91397dde00e9a445f89964 (commit)
      from  1cdfa5b84202c455b9fb26bc755c446daf736cb3 (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 4dd4038557f89f3384f3a3246b8601db4fe0fa63
Author: Nikos Mavrogiannopoulos <[email protected]>
Date:   Mon Apr 9 13:40:54 2012 +0200

    corrected DH generation check.

commit 3c8ddf27dead54f1b406ea4b17c67999489def84
Author: Nikos Mavrogiannopoulos <[email protected]>
Date:   Mon Apr 9 13:39:53 2012 +0200

    updated

commit 56df68691364f1bc0b0809710d575fa285210ece
Author: Nikos Mavrogiannopoulos <[email protected]>
Date:   Mon Apr 9 13:17:01 2012 +0200

    gnutls_record_check_pending functionality was divided to gnutls_record_check_pending and gnutls_record_check_unprocessed.

commit ab591d8e381f9808ae5d84bd6bef0cb8ada46b56
Author: Nikos Mavrogiannopoulos <[email protected]>
Date:   Mon Apr 9 13:06:33 2012 +0200

    doc updates

commit d4421b9baba6c553e6922798cb0448485217be98
Author: Nikos Mavrogiannopoulos <[email protected]>
Date:   Sun Apr 8 23:45:22 2012 +0200

    refuse to generate small group sizes.

commit 720f2a971f2c75459c91397dde00e9a445f89964
Author: Nikos Mavrogiannopoulos <[email protected]>
Date:   Sun Apr 8 20:07:09 2012 +0200

    do not check for fchmod

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

Summary of changes:
 NEWS                            |    9 +++++++--
 configure.ac                    |    2 +-
 doc/Makefile.am                 |   19 ++++++++++---------
 lib/gnutls_buffers.c            |   18 +++++++++++++++++-
 lib/gnutls_handshake.c          |    6 ++++--
 lib/gnutls_int.h                |    4 ++--
 lib/includes/gnutls/gnutls.h.in |    1 +
 lib/nettle/mpi.c                |    2 +-
 8 files changed, 43 insertions(+), 18 deletions(-)

diff --git a/NEWS b/NEWS
index dd64b59..13b787b 100644
--- a/NEWS
+++ b/NEWS
@@ -4,12 +4,17 @@ See the end for copying conditions.
 
 * Version 3.0.19 (unreleased)
 
+** libgnutls: gnutls_record_check_pending() no longer
+returns unprocessed data, and thus ensure the non-blocking
+of the next call to gnutls_record_recv(). To compensate
+for unprocessed data, the gnutls_record_check_unprocessed() 
+was added.
+
 ** tests: Disabled floating point test, and corrections
 in pkcs12 decoding tests.
 
 ** API and ABI modifications:
-No changes since last version.
-
+gnutls_record_check_unprocessed: Added
 
 * Version 3.0.18 (released 2012-04-02)
 
diff --git a/configure.ac b/configure.ac
index ba60ce8..5350a90 100644
--- a/configure.ac
+++ b/configure.ac
@@ -124,7 +124,7 @@ AC_C_BIGENDIAN
 
 
 dnl No fork on MinGW, disable some self-tests until we fix them.
-AC_CHECK_FUNCS([fork getrusage getpwuid_r daemon fchmod],,)
+AC_CHECK_FUNCS([fork getrusage getpwuid_r daemon],,)
 AM_CONDITIONAL(HAVE_FORK, test "$ac_cv_func_fork" != "no")
 AC_LIB_HAVE_LINKFLAGS(pthread,, [#include <pthread.h>], [pthread_mutex_lock (0);])
 
diff --git a/doc/Makefile.am b/doc/Makefile.am
index ace7359..7928971 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -190,15 +190,6 @@ HEADER_FILES = $(top_srcdir)/lib/includes/gnutls/gnutls.h.in \
 	$(top_srcdir)/lib/includes/gnutls/dtls.h $(top_srcdir)/lib/includes/gnutls/crypto.h \
 	$(top_srcdir)/lib/includes/gnutls/ocsp.h
 
-stamp_functions: gnutls-api.texi x509-api.texi pgp-api.texi pkcs12-api.texi pkcs11-api.texi abstract-api.texi compat-api.texi dtls-api.texi crypto-api.texi ocsp-api.texi
-	$(MAKE) compare-makefile
-	for i in $^; do \
-		$(srcdir)/scripts/split-texi.pl functions < $$i; \
-	done
-	sed -i 's/\@anchor{.*//g' functions/*
-	sed -i 's/\@subheading.*//g' functions/*
-	echo $@ > $@
-
 gnutls-api.texi: $(top_srcdir)/lib/includes/gnutls/gnutls.h.in
 	echo "" > $@-tmp
 	for i in `$(top_srcdir)/doc/scripts/getfuncs.pl <$(top_srcdir)/lib/includes/gnutls/gnutls.h.in|sort|uniq`; do \
@@ -360,6 +351,16 @@ enums.texi: $(HEADER_FILES)
 gnutls_TEXINFOS += $(ENUMS) $(FUNCS)
 DISTCLEANFILES += $(ENUMS) stamp_enums stamp_functions
 
+stamp_functions: gnutls-api.texi x509-api.texi pgp-api.texi pkcs12-api.texi pkcs11-api.texi abstract-api.texi compat-api.texi dtls-api.texi crypto-api.texi ocsp-api.texi
+	-mkdir functions
+	for i in $^; do \
+		$(srcdir)/scripts/split-texi.pl functions < $$i; \
+	done
+	sed -i 's/\@anchor{.*//g' functions/*
+	sed -i 's/\@subheading.*//g' functions/*
+	echo $@ > $@
+	$(MAKE) compare-makefile
+
 stamp_enums: enums.texi
 	-mkdir enums
 	$(srcdir)/scripts/split-texi.pl enums enum < enums.texi
diff --git a/lib/gnutls_buffers.c b/lib/gnutls_buffers.c
index 2d4fdc3..a7c00ca 100644
--- a/lib/gnutls_buffers.c
+++ b/lib/gnutls_buffers.c
@@ -93,7 +93,23 @@ _gnutls_record_buffer_put (gnutls_session_t session,
 size_t
 gnutls_record_check_pending (gnutls_session_t session)
 {
-  return _gnutls_record_buffer_get_size (session) + session->internals.record_recv_buffer.byte_length;
+  return _gnutls_record_buffer_get_size (session);
+}
+
+/**
+ * gnutls_record_check_unprocessed:
+ * @session: is a #gnutls_session_t structure.
+ *
+ * This function checks if there are unprocessed data
+ * in the gnutls record buffers. Those data might not
+ * be complete records.
+ *
+ * Returns: Returns the size of the data or zero.
+ **/
+size_t
+gnutls_record_check_unprocessed (gnutls_session_t session)
+{
+  return session->internals.record_recv_buffer.byte_length;
 }
 
 int
diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c
index f2331d0..8dc3264 100644
--- a/lib/gnutls_handshake.c
+++ b/lib/gnutls_handshake.c
@@ -2681,7 +2681,8 @@ _gnutls_recv_handshake_final (gnutls_session_t session, int init)
        * we have received it unless we notify him. So we
        * wait for a message and retransmit if needed. */
       if (IS_DTLS(session) && !_dtls_is_async(session) && 
-          gnutls_record_check_pending (session) == 0)
+          (gnutls_record_check_pending (session) +
+          gnutls_record_check_unprocessed (session)) == 0)
         {
           ret = _dtls_wait_and_retransmit(session);
           if (ret < 0)
@@ -2718,7 +2719,8 @@ _gnutls_recv_handshake_final (gnutls_session_t session, int init)
       STATE = STATE31;
 
        if (IS_DTLS(session) && !_dtls_is_async(session) && 
-           gnutls_record_check_pending( session) == 0)
+           (gnutls_record_check_pending( session) +
+           gnutls_record_check_unprocessed (session)) == 0)
          {
            ret = _dtls_wait_and_retransmit(session);
            if (ret < 0)
diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h
index e9c617d..4a60ae0 100644
--- a/lib/gnutls_int.h
+++ b/lib/gnutls_int.h
@@ -654,7 +654,7 @@ typedef union
 
 typedef struct
 {
-  /* holds all the data received by the record layer */
+  /* holds all the parsed data received by the record layer */
   mbuffer_head_st record_buffer; 
 
   int handshake_hash_buffer_prev_len;           /* keeps the length of handshake_hash_buffer, excluding
@@ -702,7 +702,7 @@ typedef struct
   /* this buffer holds a record packet -mostly used for
    * non blocking IO.
    */
-  mbuffer_head_st record_recv_buffer;   /* buffer holding the record that is currently 
+  mbuffer_head_st record_recv_buffer;   /* buffer holding the unparsed record that is currently 
                                          * being received */
   mbuffer_head_st record_send_buffer;   /* holds cached data
                                          * for the gnutls_io_write_buffered()
diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in
index 035f638..be85dc9 100644
--- a/lib/includes/gnutls/gnutls.h.in
+++ b/lib/includes/gnutls/gnutls.h.in
@@ -857,6 +857,7 @@ gnutls_ecc_curve_t gnutls_ecc_curve_get(gnutls_session_t session);
   ssize_t gnutls_record_set_max_size (gnutls_session_t session, size_t size);
 
   size_t gnutls_record_check_pending (gnutls_session_t session);
+  size_t gnutls_record_check_unprocessed (gnutls_session_t session);
 
   int gnutls_prf (gnutls_session_t session,
                   size_t label_size, const char *label,
diff --git a/lib/nettle/mpi.c b/lib/nettle/mpi.c
index f375a79..d4612b8 100644
--- a/lib/nettle/mpi.c
+++ b/lib/nettle/mpi.c
@@ -427,7 +427,7 @@ gen_group (mpz_t * prime, mpz_t * generator, unsigned int nbits, unsigned int *q
   q_bytes = _gnutls_pk_bits_to_subgroup_bits (nbits);
   q_bytes /= 8;
 
-  if (q_bytes == 0)
+  if (q_bytes == 0 || q_bytes >= p_bytes)
     {
       gnutls_assert ();
       return GNUTLS_E_INVALID_REQUEST;


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.