wire-format

How to detect an incoming SSL (https) handshake (SSL wire format)?

I'm writing a server which is accepting incoming TCP connections. Let's suppose the server has accepted a TCP connection, and has already received 16 (or so) bytes from the client. Knowing those 16 bytes how can the server detect whether the client wants to initiate an SSL handshake? I've made an experiment, which showed that on my Linu...