On 11/29/2010 2:34 AM, A. N. Alias wrote:
I've been using IE, Chrome and Firefox as clients for a test SSL/TLS server. This works fine with Firefox, which uses a single TCP connection for the TLS handshake and subsequent communication. However, IE and Chrome seem often to send different parts of the handshake on different TCP connections. When this happens, the server fails.
It is certainly possible for a browser to have more than one connection to the same server, each in a different state.
As an example, IE may connect and send a ClientHello. The server responds with a ServerHello on the same socket. IE then replies with ClientExchange/ChangeCipherSpec/Finished, but not necessarily on the same socket. Instead, IE may establish a brand new TCP connection and send the messages over that -- all while the server is expecting the messages on the original socket. The server remains blocked on a recv() for that socket, waiting for data that will never come through it.
If so, then the server is stupid. Why would a server that had two connections ever remain blocked in a 'recv' on one of them? Clients generally make no timeliness guarantees, but servers generally do. So it is almost never acceptable for a server to say "I won't do job X for client Y until I can do job Z for client T."
How does one deal with a handshake sent over multiple TCP connections? It's not clear how to determine which connections are sending data for which handshakes, especially when many clients hit the server hard.
Each connection is sending data for that connection's handshake. > The server doesn't know
whether to call recv() to receive handshake messages over the original connection, or to use accept()/recv() to take a new connection. If a new connection does come, can we simply terminate the original one?
Any sensible server can handle multiple connections in parallel. There are many architectures you can use including multi-threaded, all non-blocking network I/O, process per connection, and so on.
I might well be missing something here, or perhaps not correctly interpreting what I'm seeing in the debug spew. Any help much appreciated. Thanks,
If you're developing a server that ever gets into a state where it will not do any work for any client until a particular client does some particular thing, you're probably not going to ever be happy with the results.
DS ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [email protected] Automated List Manager [email protected]
