From f033925557c6d91d00273de4d0e3ddad5ab21d87 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Fri, 17 Mar 2017 19:11:45 +0100 Subject: TLS13: fix key expansion for AES256 "key_len" refers to the key length of an algorithm, not the block size. For AES128 both are the same, but for AES256 it is different. Change-Id: Ic657265d90323eb224b133b23232cb809264ab64 Ping-Bug: 12779 Reviewed-on: https://code.wireshark.org/review/20598 Reviewed-by: Alexis La Goutte Petri-Dish: Alexis La Goutte Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/dissectors/packet-ssl-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'epan/dissectors/packet-ssl-utils.c') diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c index d9bd14052e..b19eedf963 100644 --- a/epan/dissectors/packet-ssl-utils.c +++ b/epan/dissectors/packet-ssl-utils.c @@ -3505,7 +3505,7 @@ tls13_generate_keys(SslDecryptSession *ssl_session, const StringInfo *secret, gb return FALSE; } - key_length = (guint) gcry_cipher_get_algo_blklen(cipher_algo); + key_length = (guint) gcry_cipher_get_algo_keylen(cipher_algo); /* AES-GCM/AES-CCM/Poly1305-ChaCha20 all have N_MIN=N_MAX = 12. */ iv_length = 12; ssl_debug_printf("%s key_length %u iv_length %u\n", G_STRFUNC, key_length, iv_length); -- cgit v1.2.1