> Here are the steps in brief
>
> a) make a socket fd non-blocking and link with a ssl object.
> b) Call SSL_connect and this returns wait for read.
> c) Place this socket fd in the select call redable list.
> d) Whenever select call indicates this socket is readable again call
> SSL_connect until this call returns success (and not -1 that indicate
> SSL_ERR_WANT_read). This genrally happens 2-3 times ONLY on windows
> machine..
> e) After than suppose ur client want to write sth, than do SSL_write
> for ur data. if u had to read than again place sock fd in the read
> socket list of the Select call and wait for the socket to become
> readable.
> f) Once the sock is readable, do SSL_read and likewise..
>
> I would suggest test ur application in blocking mode and than move
> towards non-blocking I/O..

        Step 'e' is wrong. The SSL engine may have already read the data and 
your
'select' may block forever. You should only wait for 'select' to give you
read hit before calling SSL_read if your last SSL operation returned a
WANT_READ indication.

        DS



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

Reply via email to