> The problem is that the clients have been hacked to add some > information > within the first packet sent over. and i, unfortunately, can't change > that. so i need to be able to read in the raw first 128 bits, get some > info out of that, and the have the SSL connection go just as normal, > never > needing to intervene again. off the top of my head (i do not access > to > the code right now), it places a few bits of info where it claims the > first cipher is,but getting the cipher list does not show anything > useful > (i think bits 40 and 41 for SSLv2 for instance)
You have an ugly problem. There are two ways you can solve it: 1) Do it right using BIO pairs. This will require a lot of new coding. 2) Fake it. Call 'accept', get the socket, 'select' or whatever you do to discover the socket is ready for action. Try to recv(MSG_PEEK) the first 16 bytes. If you get fewer than 16 bytes, you'll have to try again later (that's the ugly part). When you finally do get 16 bytes peeked, process them however you need. Then wrap the socket in an SSL connection and let it read the first 16 bytes too. DS ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org