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..

HTH
-Krishna

On 8/15/06, Frank Büttner <[EMAIL PROTECTED]> wrote:
Krishna M Singh schrieb:
> Hi
>
> In non-blocking mode, for client we call
> SSL_connect
>
> In case SSL_connect returns -1 with SSL_ERROR_WANT_READ u need to wait
> in Select and once the sock fd is readable, u again need to all
> SSL_connect till the SSL_connect returns success or some other error
> code (except read or write wait)..
>
> So we are calling SSL_Connect 2-3 times in Non blocking mode...
> HTH
> Krishna
Ok when I try 40 times then it will work.
But after connected I can't receive any data.
When the Qt signal readyRead() is emitted I call SSL_read. This will
give the  SSL_ERROR_WANT_READ again. But the data that Qt tell me that I
can red will grow form try to try. Must I call some other functions?



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

Reply via email to