Update of /home/cvs/gsasl/src
In directory dopio:/tmp/cvs-serv17743
Modified Files:
gsasl.c
Log Message:
Work around GnuTLS bug when sending zero length messages.
--- /home/cvs/gsasl/src/gsasl.c 2005/09/20 12:32:10 1.78
+++ /home/cvs/gsasl/src/gsasl.c 2005/10/23 11:45:04 1.79
@@ -42,11 +42,18 @@
if (sockfd)
{
- size_t len;
+ ssize_t len;
#ifdef HAVE_LIBGNUTLS
if (using_tls)
- len = gnutls_record_send (session, str, strlen (str));
+ {
+ /* GnuTLS < 1.2.9 cannot handle data != NULL && count == 0,
+ it will return an error. */
+ if (len > 0)
+ len = gnutls_record_send (session, str, strlen (str));
+ else
+ len = 0;
+ }
else
#endif
len = write (sockfd, str, strlen (str));
_______________________________________________
Gsasl-commit mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gsasl-commit