On Thu, Nov 25, 1999 at 04:23:42PM +0000, Geoff Thorpe wrote:
> On Wed, 24 Nov 1999, Dan Kegel wrote:

>> I see on the mailing list that OpenSSL does support
>> nonblocking I/O, and various people mention using it with
>> poll(), but I have yet to find a nice example program
>> that uses poll() to both wait for new connections and
>> decide when it's time to service existing ones.
>> (You know, the classical event-based server.)

> well s_client and s_server kind of do it. [...] The code is hardly
> the most beautiful thing you'll ever gaze upon, and you'd probably
> want to put a wrapper around the whole socket/BIO machinery to make
> it pleasant to use in your own coding (and especially to manage
> multiple connections) but it is illustrative if you stare at it long
> enough.
> 
> I've also found printing it out, dipping it in lemon juice, and holding it
> up to ultra-violet light can help.

This might help.  I'm still not convinced that s_client and s_server
are correct w.r.t. handling non-blocking I/O (the problem is that when
the peer starts renegotiation, one may have to wait for readable data
at the socket to be able to do SSL_write, and for the possibility to
write data to be able to do SSL_read; s_client and s_server may happen
to do the right thing, but they're too unreadable to make sure).  In
any case, note that you probably don't want to handle multiple
concurrent connections in the same thread because public-key
computations can be quite time-consuming, and you'd stop all other
connections while computing a RSA signature for just one.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to