Not sure how SSL_read should work but if it is anything like
standard read() it looks ok to me.
> man read
" If nbyte is not zero and read() returns 0, then EOF has been
reached. If readv() returns 0, then EOF has been reached."
i.e. remote side has called close() (or shutdown( write half ))
on the socket.
/Lennart Bang
TCP/IP knudel
[EMAIL PROTECTED]
>
> Hi,
>
> I am reading across the network, using SSLeay-0.9.0.b, and have an
> intermittent problem - the sending socket is being closed, but this is
> not always being detected by the receiving SSL. In particular,
>
> SSL_read(ssl, buffer, length)
>
> is returning zero rather than -1.
>
> This seems to be a bug, possibly connected with non-blocking reads. So
> is there a fix and/or can anyone describe how to do blocking reads (I
> have tried before, but couldn't make sense of the various brief messages
> from eay that were archived on the (old) newsgroup)?
>
> Thanks,
> Andrew
>
>
> PS. Further info:
>
> BIO_eof(SSL_get_rbio(ssl)) is also returning zero
>
> Looking at the windows docs, it seems that detection of socket closure
> on NT requires detecting:
> - select indicating that data is available to read
> - recv then returning 0
> for non-blocking reads.
>
>
> ______________________________________________________________________
> OpenSSL Project http://www.openssl.org
> User Support Mailing List [EMAIL PROTECTED]
> Automated List Manager [EMAIL PROTECTED]
>
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]