[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openssl-users
Subject:    Re: SSL_connect behaviour
From:       Eric Rescorla <ekr () rtfm ! com>
Date:       2001-11-29 19:35:18
[Download RAW message or body]

"Patrick Li" <pcwli@home.com> writes:
> I am experiencing the SSL_connect() call is blocking indefinitely over
> blocking socket under the following scenario:
> 
> Server performs ::bind() and ::listen(), hasn't executed ::accept() nor
> SSL_accept() yet.
> 
> Client performs ::connect() and SSL_connect() and it is blocking forever.
> 
> I can understand that the client is waiting for the server to perform the
> handshake but since the server hasn't executed accept() and SSL_accept()
> yet, it is blocked.   My question is should SSL_connect return error in this
> scenairo?
No. There's no way for the client to know that the server hasn't called
accept(). The only thing you can do is set a timeout so you don't block
forever.

-Ekr

-- 
[Eric Rescorla                                   ekr@rtfm.com]
                http://www.rtfm.com/
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majordomo@openssl.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic