wireshark/test
Mikael Kanstrup ad69ec2e11 dot11decrypt: Fix WEP decryption
For WPA security association (SA) entries are created on sucessful
PTK derivation from 4-way handshake frames. WEP though don't use
4-way handshake frames for key derivation and therefore no SA entry
is created. Still WEP decryption implementaton expects to find
an SA otherwise the decryption is skipped.

Fix broken WEP decryption by removing the check for an existing SA
entry and instead form the SA on first successful decryption.

Add also a test for WEP decryption.

Fixes: v3.3.0rc0-1263-g099d241046 ("dot11decrypt: Avoid allocating SA on packet decryption")
2020-10-21 11:03:44 +00:00
..
baseline A Community ID implementation for Wireshark. 2020-09-16 09:25:38 -07:00
captures dot11decrypt: Fix WEP decryption 2020-10-21 11:03:44 +00:00
config dot11decrypt: Fix WEP decryption 2020-10-21 11:03:44 +00:00
keys Add support for RSA decryption using PKCS #11 tokens 2018-12-29 10:40:16 +00:00
lua Lua: base64_decode: handle unpadded data 2020-10-19 08:38:31 +00:00
suite_dfilter dfilter: fix memory leaks on dfilter compile errors involving a set 2019-01-28 11:09:35 +00:00
suite_dissectors Unit tests for ASTERIX I048 2019-01-11 18:35:29 +00:00
README.test Qt: Add a packet diagram view. 2020-08-10 18:17:50 +00:00
conftest.py Test: enable capture tests by default using the Loopback interface 2019-01-24 00:26:17 +00:00
fixtures.py Fix issues discovered by common python linters 2020-09-26 04:38:18 +00:00
fixtures_ws.py dot11decrypt: Support decryption using TK user input 2020-06-01 07:23:56 +00:00
hosts.custom Continue to remove $Id$ from top of file 2014-03-31 18:48:06 +00:00
hosts.global Continue to remove $Id$ from top of file 2014-03-31 18:48:06 +00:00
hosts.personal Continue to remove $Id$ from top of file 2014-03-31 18:48:06 +00:00
matchers.py test: extend sharkd tests to cover all requests 2018-11-21 04:36:20 +00:00
sampleif.py test: fix sampleif.py on weird systems using Python 3.6 and older 2019-04-16 03:28:43 +00:00
subprocesstest.py Fix issues discovered by common python linters 2020-09-26 04:38:18 +00:00
suite_capture.py Fix issues discovered by common python linters 2020-09-26 04:38:18 +00:00
suite_clopts.py Fix issues discovered by common python linters 2020-09-26 04:38:18 +00:00
suite_decryption.py dot11decrypt: Fix WEP decryption 2020-10-21 11:03:44 +00:00
suite_dissection.py SMB2: add tests for chained compression and pattern_v1 2020-09-26 02:23:23 +00:00
suite_extcaps.py test: fix extcap_name fixture and skip test. 2019-12-20 22:25:31 +00:00
suite_fileformats.py editcap: warn when --inject-secrets is given a RSA private key 2019-02-05 15:36:40 +00:00
suite_follow.py Test: Normalize the line endings of subprocess output. 2020-09-16 13:35:11 -07:00
suite_io.py test: use assertRun instead of runProcess where possible 2018-11-30 06:11:06 +00:00
suite_mergecap.py test: use assertRun instead of runProcess where possible 2018-11-30 06:11:06 +00:00
suite_nameres.py test: use assertRun instead of runProcess where possible 2018-11-30 06:11:06 +00:00
suite_outputformats.py test: fix comment. 2019-12-14 18:15:19 +00:00
suite_release.py Test+Qt: Add an automatic update check. 2020-02-15 11:13:25 +00:00
suite_sharkd.py epan/to_str: change MAX_BYTE_STR_LEN from 48 to 72 2020-01-26 19:31:34 +00:00
suite_text2pcap.py Update our issue tracker URL in some places. 2020-09-16 01:29:07 +00:00
suite_unittests.py test: convert capture tests to use fixtures, fix tests without dumpcap 2018-11-16 13:55:28 +00:00
suite_wslua.py tests: Skip Lua related tests when Lua is not present 2019-01-28 21:03:04 +00:00
test.py Test: Remove an unused routine. 2020-07-08 05:08:23 +00:00
travis-upload-artifacts.sh test,travis: dump a screenshot for hanging GUI tests 2019-01-24 00:26:22 +00:00
util_dump_dhcp_pcap.py Dumpcap+Qt: Add support for `-a packets:NUM` and `-b packets:NUM`. 2018-11-09 05:55:11 +00:00

README.test

Wireshark Tests

The recommended steps to prepare for and to run tests:

* Install two Python packages, pytest: `pip install pytest pytest-xdist`
* Build programs (“wireshark”, “tshark”, etc.): `ninja`
* Build additional programs for the “unittests” suite: `ninja test-programs`
* Run tests in the build directory: `pytest`

Replace `ninja test-programs` by `make test-programs` as needed.

See the “Wireshark Tests” chapter of the Developer's Guide for details:
https://www.wireshark.org/docs/wsdg_html_chunked/ChapterTests.html

If you need to update the baseline files use the following commands (on a Linux system)
mkdir ~/.config/wireshark/profiles/ctest
TZ=UTC WIRESHARK_RUN_FROM_BUILD_DIRECTORY=1 build/run/tshark -C ctest -T ek -r test/captures/dhcp.pcap > test/baseline/dhcp.ek
TZ=UTC WIRESHARK_RUN_FROM_BUILD_DIRECTORY=1 build/run/tshark -C ctest -T json -r test/captures/dhcp.pcap > test/baseline/dhcp.json
TZ=UTC WIRESHARK_RUN_FROM_BUILD_DIRECTORY=1 build/run/tshark -C ctest -T jsonraw -r test/captures/dhcp.pcap > test/baseline/dhcp.jsonraw
TZ=UTC WIRESHARK_RUN_FROM_BUILD_DIRECTORY=1 build/run/tshark -C ctest -T ek -r test/captures/dhcp.pcap -x > test/baseline/dhcp-raw.ek