Okay, I think I get it. Every OpenSSL example I have seen uses BIO, but
there is no need to use BIO, right (unless one wants I/O-type-independence)?

I have eliminated all of my BIO usage. I'm using normal TCP/IP bind(),
select(), accept(), and then SSL_set_fd(ssl, socket) and SSL_accept(); I
then use SSL_read() to read data on the session. It seems to be working
(with some loose ends, but I am getting farther than before).

Is there anything wrong with this approach? Is this approach a bad idea?

Charles
-----Original Message-----
From: owner-openssl-us...@openssl.org
[mailto:owner-openssl-us...@openssl.org] On Behalf Of CharlesTSR
Sent: Tuesday, August 14, 2012 5:12 PM
To: openssl-users@openssl.org
Subject: How do session accept timeout with OpenSSL


Thanks Dave for your time and patience.

I am porting an existing Windows-based TCP/IP server (receive-only, not a
Web server) to OpenSSL.

The way it works with TCP/IP is it sets up a socket, binds it to the desired
port, sets up a timeval, and issues a select. When the select is satisfied
if the socket is ready it starts a thread that issues an accept and goes
into a receive loop. Otherwise it does some housekeeping like checking for a
"quit" flag. In any event it loops back around to the select. Pretty typical
I think.

Most of that ports fairly straightforwardly to OpenSSL. Not one to one, but
pretty straghtforward: BIO_new_accept(), BIO_do_accept() * 2, BIO_pop(),
SSL_setbio(), ...

What about the select? Is there some sort of BIO_select()? Is there some way
to do SSL on native sockets rather than BIO objects? BIO has (I think!) a

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to