>If handshake_func is not initialised (i.e. is 0 because that's what
>SSL_new sets it to), then I guess your application failed to call
>SSL_set_accept_state before any of SSL_do_handshake, SSL_read or
>SSL_write are used, which it really has to.  SSL_set_accept_state is
>defined as follows:

>void SSL_set_accept_state(SSL *s)
>       {
>       s->server=1;
>       s->shutdown=0;
>       s->state=SSL_ST_ACCEPT|SSL_ST_BEFORE;
>       s->handshake_func=s->method->ssl_accept;
>       /* clear the current cipher */
>       ssl_clear_cipher_ctx(s);
>       }

Mea culpa.  Guilty as charged.  Although in whining, petulant self-defense 
may I say from a quick look at the 0.9.0b ssl.doc that I'm wondering if
this isn't an enhancement for non-blocking i/o that has the unfortunate
side-effect of exposing us multi-threaded, blocking i/o neanderthals to a 
crash just 'cuz we didn't keep take s_server.c for bed-time reading each 
night ... :)  Thanks again for looking into this.  

TT



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to