> In fact I'm using a custom BIO to interface between OpenSSL and some
> custom buffer structures. If I hadn't misread the protocol, for
> application data, SSL_write() should be able to proceed even when a
> SSL_read() returned WANT_READ. But what about rehandshake? If the
> SSL_read() returned WANT_READ during rehandshaking, will a SSL_write()
> at this moment conflict with it?

        The SSL state machine will do whatever it has to do. When you ask it to 
do
an operation, it will do it if it can and tell you if it cannot. The
SSL_write may fail with the same error, but you can certainly attempt it.

        In fact, one common approach to SSL looks like this:

1) Call 'select' or wait until you need to do something
2) Try everything you can possibly do making as much forward progress as you
can.
3) Loop

        In this case, it is quite natural to try both a read and a write before
giving up and waiting to try later.

        DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to