> You are right that I am making a non-blocking SSL_accept call.

> The problem is on vxWorks when 'select' states that some
> connection request
> is present, SSL_accept returns failure with error code as
> SSL_ERROR_WANT_READ.

That's because the connection request was present but the negotiation data
was not. So the accept cannot complete without blocking.

> But if I add some delay in between this 'select' and 'SSL_accept', then it
> returns with successful handshake.

That's because if you do that, the data is present, so the operation would
not have blocked.

> Moreover, this behavior is not observed on Linux Platform.

> As per documentation, in case of non-blocking socket, should I
> call 'select'
> again to check in the request is still there and then call
> SSL_accept again?

You should 'select' for readability on the newly-accepted connection to see
if data is available for reading. You have to do this for all non-blocking
SSL socket operations. If you get 'WANT_READ', then you have to retry the
operation when the socket is readable (or you've made other forward
progress). 'SSL_ERROR_WANT_READ' is somewhat analogous to EAGAIN.

DS


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

Reply via email to