gnutls-devel
[Top][All Lists]
Advanced

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

Patch for _gnutls_send_finished in gnutls_handshake.c


From: Tim Kosse
Subject: Patch for _gnutls_send_finished in gnutls_handshake.c
Date: Tue, 30 Jun 2009 23:23:23 +0200
User-agent: Thunderbird 2.0.0.22 (Windows/20090605)

This is the handshake issue I've mentioned earlier. This problem exists
in 2.6.4 as well as 2.8.

If _gnutls_send_finished fails with GNUTLS_E_AGAIN or GNUTLS_E_AGAIN it
eventually gets called a second time.

It however does not call _gnutls_send_handshake with a NULL pointer on
repeated calls, ultimately leading to an internal error in
_gnutls_handshake_io_send_int.

The attached patch simply makes sure to also pass a NULL pointer to
_gnutls_send_handshake if data_size is 0.

Regards,
Tim Kosse
--- lib/gnutls_handshake.c_old  2009-06-30 23:14:48.000000000 +0200
+++ lib/gnutls_handshake.c      2009-06-30 23:14:52.000000000 +0200
@@ -573,7 +573,7 @@
     }
 
   ret =
-    _gnutls_send_handshake (session, data, data_size,
+    _gnutls_send_handshake (session, data_size ? data : 0, data_size,
                            GNUTLS_HANDSHAKE_FINISHED);
 
   return ret;

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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