This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

how to setup relative Paths (e.g. SSL keys) in config files (portable)

1

Hi,

i'd like to use the portable Wireshark and preconfigure it for my colleagues. We often need to decrypt traces with some pre-shared SSL Private keys.

I would like to setup the Keys (IPs, Ports, Protocols, Path to Private keys) and then distribute the config, or pack the config back into a package to redistritube the portable wireshark.

however, i cant seem to find a way to make the paths to the SSL keys relative. I googled and there seems to be questions like this but i did not find a helpful answer.

Is there an easy way to specifiy a relative path in the ssl_keys file? Where would the paths be relative to? To the ssl_key file (i.e. a subfulder with the keys would be in the Data\ folder)?

Thanks for any useful advice.

asked 18 May '16, 02:29

aslmx's gravatar image

aslmx
11226
accept rate: 0%


One Answer:

2

The paths to the RSA private key is relative to the current working directory (whatever directory that you started Wireshark from, typically your home directory).

To make it truly portable, you could create a wrapper script that changes the working directory to an appropriate location (i.e. the location of your configuration). For Windows, you could for example use this (untested) run-wireshark.cmd file:

@echo off
: Change directory to the location of this script
cd %~dp0
path\to\wireshark.exe %*

The file location in ssl_keys should then be relative to this directory. Pcaps can be dropped on this batch file too. Alternatively you could use the old keys_list option as described at https://wiki.wireshark.org/SSL, something like wireshark -okeys_list:... %*.

answered 18 May '16, 07:33

Lekensteyn's gravatar image

Lekensteyn
2.2k3724
accept rate: 30%

Thank you. That helped me! The paths are relative to the path wireshark.exe gets called from or to the working directory you specify in a desktop shortcut.

(18 May '16, 22:37) aslmx