diff options
author | Evan Huus <eapache@gmail.com> | 2013-10-09 17:21:30 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-10-09 17:21:30 +0000 |
commit | 7058b878332b5a73fd482d046eeefba2e87685d4 (patch) | |
tree | 6954aa1a9dc07ffd177a76d2d7f614f7c78291de | |
parent | 32bc65aa8cb90c7554e1d41b6a2964e15fb1ce41 (diff) | |
download | wireshark-7058b878332b5a73fd482d046eeefba2e87685d4.tar.gz |
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
-rw-r--r-- | test/captures/c1222_std_example8.pcap | bin | 0 -> 319 bytes | |||
-rw-r--r-- | test/config/c1222_decryption_table.tmpl | 2 | ||||
-rwxr-xr-x | test/suite-decryption.sh | 20 |
3 files changed, 21 insertions, 1 deletions
diff --git a/test/captures/c1222_std_example8.pcap b/test/captures/c1222_std_example8.pcap Binary files differnew file mode 100644 index 0000000000..ad517f04b9 --- /dev/null +++ b/test/captures/c1222_std_example8.pcap 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() { |