diff options
author | Gerald Combs <gerald@wireshark.org> | 2012-03-30 23:51:48 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2012-03-30 23:51:48 +0000 |
commit | 5332cb82b2435b8d10e124f18f0857b782a78bdd (patch) | |
tree | d5e301a76738d30139ce64bd41cf695783516cd4 | |
parent | 19a13c21119b731be484907f60282411ab06733a (diff) |
Add a WPA PSK decryption test.
svn path=/trunk/; revision=41865
-rw-r--r-- | test/captures/wpa-Induction.pcap | bin | 0 -> 179298 bytes | |||
-rwxr-xr-x | test/suite-decryption.sh | 21 |
2 files changed, 19 insertions, 2 deletions
diff --git a/test/captures/wpa-Induction.pcap b/test/captures/wpa-Induction.pcap Binary files differnew file mode 100644 index 0000000000..6c173cd975 --- /dev/null +++ b/test/captures/wpa-Induction.pcap diff --git a/test/suite-decryption.sh b/test/suite-decryption.sh index dd9b1efa6e..0e86255d4f 100755 --- a/test/suite-decryption.sh +++ b/test/suite-decryption.sh @@ -30,6 +30,7 @@ EXIT_COMMAND_LINE=1 EXIT_ERROR=2 UAT_FILES=" + 80211_keys ssl_keys " @@ -48,6 +49,23 @@ DIFF_OUT=./diff-output.txt # deleting files we shouldn't. DC_ID="suite-decryption.sh-$$" + +# WPA PSK +decryption_step_80211_wpa_psk() { + env $TS_DC_ENV $TSHARK $TS_DC_ARGS \ + -o "wlan.enable_decryption: TRUE" \ + -Tfields -e http.request.uri \ + -r captures/wpa-Induction.pcap \ + -R http \ + | grep favicon.ico > /dev/null 2>&1 + RETURNVALUE=$? + if [ ! $RETURNVALUE -eq $EXIT_OK ]; then + test_step_failed "Failed to decrypt IEEE 802.11 WPA PSK" + return + fi + test_step_ok +} + # SSL decryption_step_ssl() { env $TS_DC_ENV $TSHARK $TS_DC_ARGS -Tfields -e http.request.uri -r captures/rsasnakeoil2.pcap -R http | grep favicon.ico > /dev/null 2>&1 @@ -59,9 +77,8 @@ decryption_step_ssl() { test_step_ok } - tshark_decryption_suite() { - # Microsecond pcap direct read is used as the baseline. + test_step_add "IEEE 802.11 WPA PSK Decryption" decryption_step_80211_wpa_psk test_step_add "SSL Decryption" decryption_step_ssl } |