fix sniffer with new decrypt/verify code
This commit is contained in:
parent
5c57df8227
commit
de6b9bc6be
@ -1593,10 +1593,19 @@ static void Decrypt(SSL* ssl, byte* output, const byte* input, word32 sz)
|
||||
static const byte* DecryptMessage(SSL* ssl, const byte* input, word32 sz,
|
||||
byte* output)
|
||||
{
|
||||
int ivExtra = 0;
|
||||
|
||||
Decrypt(ssl, output, input, sz);
|
||||
ssl->keys.encryptSz = sz;
|
||||
if (ssl->options.tls1_1 && ssl->specs.cipher_type == block)
|
||||
return output + ssl->specs.block_size; /* go past TLSv1.1 IV */
|
||||
if (ssl->options.tls1_1 && ssl->specs.cipher_type == block) {
|
||||
output += ssl->specs.block_size; /* go past TLSv1.1 IV */
|
||||
ivExtra = ssl->specs.block_size;
|
||||
}
|
||||
|
||||
ssl->keys.padSz = ssl->specs.hash_size;
|
||||
|
||||
if (ssl->specs.cipher_type == block)
|
||||
ssl->keys.padSz += *(output + sz - ivExtra - 1) + 1;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ int main(int argc, char** argv)
|
||||
printf("ssl_Decode ret = %d, %s\n", ret, err);
|
||||
if (ret > 0) {
|
||||
data[ret] = 0;
|
||||
printf("SSL App Data:%s\n", data);
|
||||
printf("SSL App Data(%d):%s\n", ret, data);
|
||||
}
|
||||
}
|
||||
else if (saveFile)
|
||||
|
Loading…
Reference in New Issue
Block a user