On Tue, Apr 13, 1999 at 12:00:00AM +0000, Richard Levitte - VMS Whacker wrote:

>>>> SSL_read() appears to return the number of characters
>>>> returned in the buffer on success (>= 0).  If failure, it
>>>> returns < 0.  This is different from Unix read().

>>> I'm afraid you're wrong, unless you consider EOF to be a failure.

>> I do.  

EOF *is* returned as 0.

> What can be regarded as odd is that SSL_read() can return 0 even if it
> hasn't reached EOF.

This can happen only under strange circumstances, I think.
Namely, ssl2_read will return 0 if it has read an empty data block.
Probably it should really return -1 and have things arranged so that
SSL_get_error tells the application to select() on readability;
or it should directly start the next read(), which will possibly
block.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to