From a1604bd5d633cd6aeee427d7482dadd17f13c3de Mon Sep 17 00:00:00 2001 From: Alex Badea Date: Wed, 17 Sep 2014 14:40:48 +0300 Subject: test: add decryption test for isakmp with certificates This was suggested in review 2297. Capture and key are from bug 7951. Bug: 7951 Change-Id: I820c5e839b20ec464cc1be438633d5311f657fb2 Signed-off-by: Alex Badea Reviewed-on: https://code.wireshark.org/review/4143 Reviewed-by: Evan Huus --- test/captures/ikev1-certs.pcap | Bin 0 -> 6015 bytes test/config/ikev1_decryption_table.tmpl | 2 ++ test/suite-decryption.sh | 17 +++++++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 test/captures/ikev1-certs.pcap create mode 100644 test/config/ikev1_decryption_table.tmpl (limited to 'test') diff --git a/test/captures/ikev1-certs.pcap b/test/captures/ikev1-certs.pcap new file mode 100644 index 0000000000..6922aa3769 Binary files /dev/null and b/test/captures/ikev1-certs.pcap differ diff --git a/test/config/ikev1_decryption_table.tmpl b/test/config/ikev1_decryption_table.tmpl new file mode 100644 index 0000000000..8fc4d9029b --- /dev/null +++ b/test/config/ikev1_decryption_table.tmpl @@ -0,0 +1,2 @@ +# This file is automatically generated, DO NOT MODIFY. +fafaeb49382a763c,735be0cb62f82675c4f7bf8fbab9b56834ba76d6ab4fa240 diff --git a/test/suite-decryption.sh b/test/suite-decryption.sh index cd40c51215..74a419f111 100755 --- a/test/suite-decryption.sh +++ b/test/suite-decryption.sh @@ -44,6 +44,7 @@ UAT_FILES=" dtlsdecrypttablefile ssl_keys c1222_decryption_table + ikev1_decryption_table " TEST_KEYS_DIR="$TESTS_DIR/keys/" @@ -169,6 +170,21 @@ decryption_step_dvb_ci() { test_step_ok } +# IKEv1 (ISAKMP) with certificates +# https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7951 +decryption_step_ikev1_certs() { + env $TS_DC_ENV $TSHARK $TS_DC_ARGS \ + -Tfields -e x509sat.printableString \ + -r "$CAPTURE_DIR/ikev1-certs.pcap" \ + | grep "OpenSwan" > /dev/null 2>&1 + RETURNVALUE=$? + if [ ! $RETURNVALUE -eq $EXIT_OK ]; then + test_step_failed "Failed to decrypt IKEv1" + return + fi + test_step_ok +} + tshark_decryption_suite() { test_step_add "IEEE 802.11 WPA PSK Decryption" decryption_step_80211_wpa_psk @@ -178,6 +194,7 @@ tshark_decryption_suite() { test_step_add "ZigBee Decryption" decryption_step_zigbee test_step_add "ANSI C12.22 Decryption" decryption_step_c1222 test_step_add "DVB-CI Decryption" decryption_step_dvb_ci + test_step_add "IKEv1 Decryption (certificates)" decryption_step_ikev1_certs } decryption_cleanup_step() { -- cgit v1.2.3