Hello Openssl Developers,

Could you please update the documentation on BIO_read, particularly the BIO_read.pod 
file!?

There is a paragraph in the file:

---------------
A 0 or -1 return is not necessarily an indication of an error. In particular when the 
source/sink is non-blocking or of a certain type it may merely be an indication that 
no data is currently available and that the application should retry the operation 
later.
---------------

Actually, only -1 indicates that the application should retry the operation later.

If during SSL_connect with my implementation of non-blocking sockets BIO_read() 
returns 0, SSL_connect also returns 0, and the subsequent call of SSL_get_error 
returns SSL_ERROR_SYSCALL, not SSL_ERROR_WANT_READ. 

If my implementation of  BIO_read() returns -1, SSL_connect also returns -1 and 
SSL_get_error returns the correct value: SSL_ERROR_WANT_READ.


In contrast, you may want to change the source code to match the current documentation.

Thank you for cooperation!



-- 
Maxim

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to