fix bug in sniffer with SNI using the key from ctx rather than the session

This commit is contained in:
John Safranek
2014-12-04 14:16:39 -08:00
parent 7aed412512
commit 8105b9efa2

View File

@ -1285,8 +1285,8 @@ static int ProcessClientKeyExchange(const byte* input, int* sslBytes,
ret = InitRsaKey(&key, 0);
if (ret == 0)
ret = RsaPrivateKeyDecode(session->context->ctx->privateKey.buffer,
&idx, &key, session->context->ctx->privateKey.length);
ret = RsaPrivateKeyDecode(session->sslServer->buffers.key.buffer,
&idx, &key, session->sslServer->buffers.key.length);
if (ret == 0) {
int length = RsaEncryptSize(&key);