If SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE are returned, the arguments *must* be *exactly* the same. This includes the data pointed to by the buffer. There is a way to set a mode on the SSL connection to allow a moving buffer, but that's it. SSL will not buffer the data passed to it.
If SSL_write returns SSL_ERROR_WANT_READ, then just call SSL_write again. (Usually, in this case, you can select() on the underlying socket to determine if there's any pending data to be read from the socket.) If SSL_read returns SSL_ERROR_WANT_WRITE, just call SSL_read again. (You might try to select() to see if the socket is writable.) -Kyle H On Tue, Mar 31, 2009 at 10:50 AM, Balaji Kannadassan <balaj...@nortel.com> wrote: > Hi All! > > I've have some doubts regarding SSL_write in non blocking mode.. > > 1. if SSL_write returned SSL_ERROR_WANT_WRITE, it is mentioned that the > call has to be repeated with the same arguments. > Does this means the same buffer to be used again?? or the data > passed in the initial SSL_write call > will be buffered by the SSL layer? > > 2. In case of SSL_write returning SSL_ERROR_WANT_READ due to > re-negotiation, What are the steps to be followed? > Is there any wait needed before the repeated SSL_write call? > Does the application need to take care of the re-negotiation? > Does the application need to wait for the re-negotiation to > complete before repeating the SSL_write? > > > Thanks in advance > Balaji Kamal Kannadassan > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > User Support Mailing List openssl-us...@openssl.org > Automated List Manager majord...@openssl.org > ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org