aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Badea <abadea@ixiacom.com>2014-06-17 13:12:34 +0300
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2014-06-17 14:49:06 +0000
commitd1cdbd715a5c5e9395d9672394783061dd3a4bf2 (patch)
tree8a71a093503591926cba17b04d9f99827b9e7672
parentf9b05dc13213832dba10600bd0116505ed251fec (diff)
isakmp: add support for IKEv1 AES decryption
Select an appropriate gcrypt cipher based on ISAKMP encryption ID and key length attribute. Fixes bug 10128. Bug:10128 Change-Id: Ie74fc51eb9bfe6d68340056d3ef2ef28c7677fb8 Signed-off-by: Alex Badea <abadea@ixiacom.com> Reviewed-on: https://code.wireshark.org/review/2296 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
-rw-r--r--epan/dissectors/packet-isakmp.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/epan/dissectors/packet-isakmp.c b/epan/dissectors/packet-isakmp.c
index e8475a3ec1..38edee2f73 100644
--- a/epan/dissectors/packet-isakmp.c
+++ b/epan/dissectors/packet-isakmp.c
@@ -1762,6 +1762,21 @@ decrypt_payload(tvbuff_t *tvb, packet_info *pinfo, const guint8 *buf, guint buf_
case ENC_DES_CBC:
gcry_cipher_algo = GCRY_CIPHER_DES;
break;
+ case ENC_AES_CBC:
+ switch (decr->secret_len) {
+ case 16:
+ gcry_cipher_algo = GCRY_CIPHER_AES128;
+ break;
+ case 24:
+ gcry_cipher_algo = GCRY_CIPHER_AES192;
+ break;
+ case 32:
+ gcry_cipher_algo = GCRY_CIPHER_AES256;
+ break;
+ default:
+ return NULL;
+ }
+ break;
default:
return NULL;
break;