//Ciphers list. It is stored after the Session ID.
const unsigned char *ciphers = hello + 44 + sessIDLen;
int ciphersLen = (ciphers[0] << 8) | ciphers[1];
ciphers += 2;
if (ciphersLen) {
const SSL_METHOD *method = SSLv3_method();
int cs = method->put_cipher_by_char(NULL, NULL);
assert(cs > 0);
for (int i = 0; i < ciphersLen; i += cs) {
const SSL_CIPHER *c = method->get_cipher_by_char((ciphers + i));
if (c != NULL) {
if (!clientRequestedCiphers.empty())
clientRequestedCiphers.append(":");
clientRequestedCiphers.append(c->name);
} else
unknownCiphers = true;
}
}
debugs(83, 7, "Ciphers requested by client: " <<
clientRequestedCiphers);
Does anyone have advice on porting this for use wth libressl? Or would
I be better off spending the time working out how to build it with OpenSSL
instead? (It's from ssl proxy code which forwards a client connection to
a server and looks at the serverhello to decide whether to intercept or
splice the connection).