Hello,
> Grzegorz Rusin wrote:
> > On 9/5/07, Thomas Radke <[EMAIL PROTECTED]> wrote:
> > 
> >>During a connection handshake, the server gets stuck forever (or at
> >>least > 2 hours) in a call to SSL_accept() for the case where it has
> >>sent its certificate but the client doesn't respond back: because the
> >>server's certificate is unknown on the client side, the web client (a
> >>standard browser) will prompt the user to examine the certificate and
> >>either accept or reject it. While this client/user interaction hasn't
> >>finished (eg. because the user didn't notice) the server is effectively
> >>blocked.
> >>
> > 
> > 
> > I've never been using ssl with blocking io, but according to man pages
> > you need to call SSL_do_handshake() function on the server side.
> 
> I interpret the man page for SSL_do_handshake() that this routine will 
> perform a TLS/SSL handshake by calling SSL_accept() internally (when put 
> in server mode via SSL_set_accept_state()). This is what I am currently 
> doing in my code already.
> 
> So the problem persists: my server is stuck in a call to 
> [SSL_do_handshake() which calls] SSL_accept() because the handshaking 
> never finishes.
> 
> Any other idea what I can try ?
You may try:

alarm(20);
SSL_accept();
alarm(0);

with some error checking of course.

Best regards,
-- 
Marek Marcola <[EMAIL PROTECTED]>

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

Reply via email to