ssl-utils: Fix parsing pre-master-secrets in keylog-file
authorGergely Nagy <ngg@ngg.hu>
Mon, 12 Oct 2015 14:23:31 +0000 (16:23 +0200)
committerPeter Wu <peter@lekensteyn.nl>
Tue, 13 Oct 2015 07:34:24 +0000 (07:34 +0000)
commita386fc99ac72b4cdb88cb3d26fd19d6251391b96
tree4d4828fb536460761ef0da81f674a572551890a1
parentf6d61ebfe8bd4c384366512bb05f33279a6f03d9
ssl-utils: Fix parsing pre-master-secrets in keylog-file

With "PMS_CLIENT_RANDOM xxxx yyyy" lines, only 32 byte long pre-master
secrets could be entered, but they are 48 byte long for RSA and can be
of any length for DHE cipher suites.

When a line had the "RSA xxxx yyyy" format then yyyy was previously
parsed with the <master_secret> regex group but it contains
the pre-master secret, so now it is parsed with the <pms> group.
This didn't cause a functional issue for RSA, but it couldn't be used
where the pre-master secret isn't 48 byte long.

After this change the regex will accept everything that was previously
working.

Change-Id: I71f43f3e9977a5e98758f387ad69893e8be0e27a
Reviewed-on: https://code.wireshark.org/review/10923
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
epan/dissectors/packet-ssl-utils.c