[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ssl-users
Subject:    [ssl-users] SSL + O_NDELAY, select(2)
From:       "Wade L. Scholine" <wscholine () mail ! cybg ! com>
Date:       1999-02-05 22:24:23
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sorry for posting to this "defunct" list, but my openssl-dev subscribe
has not been processed yet, and I'm hoping someone will say something
about this over the weekend.

I'm trying to add SSL to an existing server. This server does lots of
complicated stuff with select(), and it uses nonblocking I/O to work
with telnet clients. For starters I'm using sslv2_server_method to
keep things as simple as possible. This is with SVR4.2.

I found that when I did SSL_accept() *after* doing a
fcntl(...O_NDELAY), the SSL handshake would get screwed up.
ssl2_accept() would always puke no later than
SSL2_ST_GET_CLIENT_MASTER_KEY, and usually before. When I moved the
nonblocking I/O call to after SSL_accept(), that problem went away and
now I can see the SSL handshake state machine going through to a
successful end every time. My question here is, how much leeway do I
have in doing setsockopt() and fcntl() type thing on a socket in
between doing accept() and SSL_accept()? Any?

The other problem has to do with select(). This server is doing
1-char-at-a-time I/O with calls to select() in between. The first
character the client sends is getting read, but after that the
select() is always timing out. If I hit the stop button on the browser
the server's trace then shows it reading all of the rest of the stuff
the client sent ("GET / HTTP/1.0", in this case) before the server
notices the client's gone. Is there something special I have to do to
use select() with SSL?

TIA * 10E6, and if you're answering this from openssl-dev, please cc:
to me so that I'll be sure to see it. I'll be there next week sometime
I guess.
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.0 for non-commercial use <http://www.pgp.com>

iQA/AwUBNrtvy9Sl9VazmvxFEQLlSACfWMpbEUJ63ofyGkuPmi46evbbP1MAnjyT
BJVzv+ljWhrAJqwpqd9T7/5y
=L+Pp
-----END PGP SIGNATURE-----
+-------------------------------------------------------------------------+
| Administrative requests should be sent to majordomo@lists.cryptsoft.com |
| List service provided by Open Software Associates, http://www.osa.com/  |
+-------------------------------------------------------------------------+

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic