[sr #107464] Secure Connections on AIX using non blocking socket

Bjørn Christensen bhc at insight.dk
Thu Aug 26 11:47:32 CEST 2010


Hello Nikos!

The code in _gnutls_read fires a gnutls_assert if  recv return -1 and the errno is different from EAGAIN and EINTR. _gnutls_read function returns GNUTLS_E_PULL_ERROR.

I think the assertion leads to the HandShake being terminated.

In the _gnutls_read when recv returns -1 and no errno it is treated as a fatal error assert and GNUTLS_E_PULL_ERROR.

Mayby is would be enough to not return the GNUTLS_E_PULL_ERROR if the errno is zero?

/bhc 




-----Original Message-----
From: n.mavrogiannopoulos at gmail.com [mailto:n.mavrogiannopoulos at gmail.com] On Behalf Of Nikos Mavrogiannopoulos
Sent: 26. august 2010 11:38
To: Bjørn Christensen
Cc: gnutls-devel at gnu.org
Subject: Re: [sr #107464] Secure Connections on AIX using non blocking socket

2010/8/26 Bjørn Christensen <bhc at insight.dk>:
> I have tried to remove the hack I have put into the _gnutls_read and added gnutls_transport_set_lowat() to zero.
> That does not solve the problem, recv still return -1 with no errno set and that still causes _gnutls_read to assert.
> I can not set in which context it would be ok to return -1 from recv and not set the errno.

A call might return -1 and no errno, but this should be treated as
fatal error and not as EINTR or EAGAIN. That's why we cannot add such
a hack to main code. You'd better keep the hack then and file a bug
report on AIX.

regards,
Nikos


More information about the Gnutls-devel mailing list