When you say that a connection 'gets accepted normally', does
that mean you do the following:

1) accept
2) use fcntl to set the connection to non-blocking
3) gets a new SSL/BIO to use the connection
4) call SSL_accept

I found that step 2 has to come after step 4.  At this point, I am
assuming that touching the socket before the SSL/BIO work is
complete causes problems, so I also set some socket options when
I set non-blocking.

Later . . .   Jim


terry johnston wrote:
>Hello All. I am trying to implement openssl with a server that uses an
>event
>notification library under Linux. I am using bio pairs to separate the
>non-blocking
>comms from the ssl layer. I am currently not able to get past the first
>SSL_accept() call.
>
>Each new client connection does the following...
>
>- gets accepted normally
>- creates a bio pair
>- sets up read & write event notification
>- receives a read notification - reads data & adds it to the network bio
>using BIO_write()
>- does a SSL_accept(), which returns -1
>- calls SSL_get_error(), which returns 111 - "not yet implemented"?
>- calls BIO_ctrl_pending() on the network bio, which shows there is
>nothing to get (presume I would call a BIO_read() to get any data for
>on-sending)
>- adds another read event notification but nothing arrives
>
>what am I doing wrong?!
>
>thank you in advance
>Terry Johnston
>  
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to