From 7058b878332b5a73fd482d046eeefba2e87685d4 Mon Sep 17 00:00:00 2001 From: Evan Huus Date: Wed, 9 Oct 2013 17:21:30 +0000 Subject: [PATCH] From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9238 Add test for ANSI C12.22 decryption. svn path=/trunk/; revision=52469 --- test/captures/c1222_std_example8.pcap | Bin 0 -> 319 bytes test/config/c1222_decryption_table.tmpl | 2 ++ test/suite-decryption.sh | 20 +++++++++++++++++++- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 test/captures/c1222_std_example8.pcap create mode 100644 test/config/c1222_decryption_table.tmpl diff --git a/test/captures/c1222_std_example8.pcap b/test/captures/c1222_std_example8.pcap new file mode 100644 index 0000000000000000000000000000000000000000..ad517f04b98526d9eb9119aff384ef362bbb2e97 GIT binary patch literal 319 zcmca|c+)~A1{MYw`2U}Qff2~juyqasiM2y97ZV6@F@gXGgDV3=rH}~&!+*9(t{^dx zEKB3z0FVw42w+fP(3-)(kl??FwSl?%VCgcJ2BvD370gVG%xm};@h;$A$l1Wi)X3uT z`9k78Ee(xEwGPLNJh#deG6Xm0SBP{jl$>5}Cs?zgYVj%ubFV`7qrA(%&pdkN1;|+- z=QThvhO>&G&hkNXRv=IV*jd-70-fct2<)CEAonbTxDcz`686by$TUiIc&~e6GR<&x XT-btV4_@;Ax*8EF_vDqa&!!9jfk#pH literal 0 HcmV?d00001 diff --git a/test/config/c1222_decryption_table.tmpl b/test/config/c1222_decryption_table.tmpl new file mode 100644 index 0000000000..4c070e100f --- /dev/null +++ b/test/config/c1222_decryption_table.tmpl @@ -0,0 +1,2 @@ +# This file is automatically generated, DO NOT MODIFY. +"2",01020304050607080102030405060708 diff --git a/test/suite-decryption.sh b/test/suite-decryption.sh index ebbe168204..5080125e1b 100755 --- a/test/suite-decryption.sh +++ b/test/suite-decryption.sh @@ -24,7 +24,6 @@ # # To do: -# ANSI C12.22 # DVB-CI # IEEE 802.15.4 # IPsec / ESP @@ -47,6 +46,7 @@ UAT_FILES=" 80211_keys dtlsdecrypttablefile ssl_keys + c1222_decryption_table " TEST_KEYS_DIR="$TESTS_DIR/keys/" @@ -121,11 +121,29 @@ decryption_step_zigbee() { test_step_ok } +# ANSI C12.22 +# https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9196 +decryption_step_c1222() { + env $TS_DC_ENV $TSHARK $TS_DC_ARGS \ + -o "c1222.decrypt: TRUE" \ + -o "c1222.baseoid:2.16.124.113620.1.22.0" \ + -r "$CAPTURE_DIR/c1222_std_example8.pcap" \ + -Tfields -e c1222.data \ + | grep "00:10:4d:41:4e:55:46:41:43:54:55:52:45:52:20:53:4e:20:92" > /dev/null 2>&1 + RETURNVALUE=$? + if [ ! $RETURNVALUE -eq $EXIT_OK ]; then + test_step_failed "Failed to decrypt C12.22 $RETURNVALUE" + return + fi + test_step_ok +} + tshark_decryption_suite() { test_step_add "IEEE 802.11 WPA PSK Decryption" decryption_step_80211_wpa_psk test_step_add "DTLS Decryption" decryption_step_dtls test_step_add "SSL Decryption" decryption_step_ssl test_step_add "ZigBee Decryption" decryption_step_zigbee + test_step_add "ANSI C12.22 Decryption" decryption_step_c1222 } decryption_cleanup_step() {