If you get an SSL_ERROR_WANT_*, you should call *exactly* the same function that you just called -- do NOT call SSL_read if you were just performing an SSL_write. Perform the select() for reading on that file descriptor (to see when it's able to be read from), and then do the SSL_write again with exactly the same parameters (including the full arguments, i.e. the entire buffer that you sent to SSL_write before -- no matter its return value for how many bytes were successfully written).
-Kyle H On Fri, May 29, 2009 at 3:40 AM, Asanka Kumara <[email protected]> wrote: > > Hi, > > Non-Blocking Server Side socket on solaris. > > > a). Attempt to write data on with SSL_write. This returned with > SSL_ERROR_WANT_READ. > > (So as I assume what should be done is, > 1. wait for data from the other end on this socket in a select call, > 2. when select detects data is available call 'SSL_read' with this socket > 3. only if SSL_read returns SSL_ERROR_NONE then call 'SSL_write' again with > above (step a) data (re-insert) > ) > > > But what happens is > 1. wait for data from the other end on this socket in a select call, > 2. when select detects data is available call 'SSL_read' with this socket > BUT THIS returns with SSL_ERROR_WANT_READ > (I assume this means SSL want more data form the other end) so I wait for > data form other end in 'select' again BUT DATA IS NOT Received from the > other end > and > Furthermore Other end (Client Side Socket - which is a blocking socket) is > also waiting (i.e. blocked) for data. > > So both ends waiting for data and no one receives !!!!!!! > > > Could any one help please !!!! > > > ******************************************************************************************************************************************************************* > > "The information contained in this email including in any attachment is > confidential and is meant to be read only by the person to whom it is > addressed. If you are not the intended recipient(s), you are prohibited from > printing, forwarding, saving or copying this email. If you have received > this e-mail in error, please immediately notify the sender and delete this > e-mail and its attachments from your computer." > > ******************************************************************************************************************************************************************* > ______________________________________________________________________ > 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]
