aboutsummaryrefslogtreecommitdiffstats
path: root/test/suite-decryption.sh
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-07-16 21:41:50 -0700
committerGuy Harris <guy@alum.mit.edu>2015-07-17 04:42:25 +0000
commit57520afe1e6119b856708bef877c8360efdcb205 (patch)
tree54e20bf8611568ec2898caf2e85f07f98060c01d /test/suite-decryption.sh
parentf82df519115dc1d949f34546ae8880d5b9eeba74 (diff)
Generate key paths as UN*X paths and then run them through cygpath.
In the decryption_step_ssl_rsa_pq - and the decryption_step_ssl_master_secret test - duplicate the code used to generate TEST_KEYS_DIR, so that we construct a UN*X-style path and then, if we're running on Windows, map the UN*X-style path, which is a Cygwin path, to the equivalent Windows-style path, and pass that to TShark on the command line. Bug: 11372 Change-Id: I442a30c4c954540a05942ed70ec3687941428a96 Reviewed-on: https://code.wireshark.org/review/9675 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'test/suite-decryption.sh')
-rwxr-xr-xtest/suite-decryption.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/test/suite-decryption.sh b/test/suite-decryption.sh
index 93547a4002..dd4202dae3 100755
--- a/test/suite-decryption.sh
+++ b/test/suite-decryption.sh
@@ -122,11 +122,12 @@ decryption_step_ssl() {
# SSL, using the server's private key with p < q
# (test whether libgcrypt is correctly called)
decryption_step_ssl_rsa_pq() {
- echo $TESTS_DIR/run_and_catch_crashes env $TS_DC_ENV $TSHARK $TS_DC_ARGS -Tfields -e http.request.uri \
- -o ssl.keys_list:"0.0.0.0,443,http,${TEST_KEYS_DIR//\\/\\\\x5c}rsa-p-lt-q.key" \
- -r "$CAPTURE_DIR/rsa-p-lt-q.pcap" -Y http
+ TEST_KEYS_FILE="$TESTS_DIR/keys/rsa-p-lt-q.key"
+ if [ "$WS_SYSTEM" == "Windows" ] ; then
+ TEST_KEYS_FILE="`cygpath -w $TEST_KEYS_FILE`"
+ fi
$TESTS_DIR/run_and_catch_crashes env $TS_DC_ENV $TSHARK $TS_DC_ARGS -Tfields -e http.request.uri \
- -o ssl.keys_list:"0.0.0.0,443,http,${TEST_KEYS_DIR//\\/\\\\x5c}rsa-p-lt-q.key" \
+ -o ssl.keys_list:"0.0.0.0,443,http,$TEST_KEYS_FILE" \
-r "$CAPTURE_DIR/rsa-p-lt-q.pcap" -Y http \
| grep / > /dev/null 2>&1
RETURNVALUE=$?
@@ -152,8 +153,12 @@ decryption_step_ssl_with_password() {
# SSL, using the master secret
decryption_step_ssl_master_secret() {
+ TEST_KEYS_FILE="$TESTS_DIR/keys/dhe1_keylog.dat"
+ if [ "$WS_SYSTEM" == "Windows" ] ; then
+ TEST_KEYS_FILE="`cygpath -w $TEST_KEYS_FILE`"
+ fi
$TESTS_DIR/run_and_catch_crashes env $TS_DC_ENV $TSHARK $TS_DC_ARGS -Tfields -e http.request.uri \
- -o "ssl.keylog_file: $TEST_KEYS_DIR/dhe1_keylog.dat" \
+ -o "ssl.keylog_file: $TEST_KEYS_FILE" \
-o "ssl.desegment_ssl_application_data: FALSE" \
-o "http.ssl.port: 443" \
-r "$CAPTURE_DIR/dhe1.pcapng.gz" -Y http \