On Tue, Jan 30, 2007, Dinh, Thao V CIV NSWCDD, K72 wrote:

> Terry
> I ran into same problem a while ago. I had a blocking server, waiting
> for client to connect. I had non-blocking client connected to server, It
> never pass SSL_connect(). I changed non-blocking to blocking I/O BEFORE
> I called SSL_connect(). It worked fined. It seem to me you need to using
> blocking socket for SSL_connect to sit there to exchange all the
> certificate,ciphes.... You can use non-blocking socket for SSL_connect,
> but you have to put into a loop to call SSL_connect again after you
> received SSL_WANt_READ or SSL_Want _write.
> 

You don't actually need to do that at all if the retry code is written
correctly. The socket can remain non blocking throughout. In fact it is
possible to have the socket non-blocking before it even connects if the
appropriate BIO is used. There is an example of this with a connect BIO in the
ocsp utility in OpenSSL 0.9.9. 

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to