Dr S N Henson wrote:
> "Reddie, Steven" wrote:
> > We are using BIO_do_handshake() to accept socket connections, which results
> > in a call to BIO_accept(). Calling BIO_accept() on a non-blocking socket
> > with no connections pending results in a fatal error on Win32, but not on
> > other platforms. The reason for this difference seems to be in the
> > processing of BIO_sock_should_retry(). This function contains:
> ...
> Now as to what you should do. You normally call BIO_do_accept() once to
> setup the socket and the second call awaits an incoming connection.
>
> I suspect the only way to be sure of things, until the BIO code is
> working properly, is to extract the underlying socket after the initial
> BIO_do_accept() then manually process accept() (using select() or
> equivalent) until a valid incoming connection is received then wrap the
> returned connected socket in a socket BIO.
That's about what I do. I don't let OpenSSL near the socket until
my server code has already accepted the connection. (I use a custom
BIO that talks to the kind of buffer my server already used before I
hacked in OpenSSL support, but a socket BIO would do fine, too.)
Guess I'm glad I did it that way, given Steven's problem report...
- Dan
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]