]> git.ipfire.org Git - thirdparty/strongswan.git/commit
identification: Validate ASN.1 DN in from_data() constructor
authorTobias Brunner <tobias@strongswan.org>
Mon, 2 Nov 2020 14:09:13 +0000 (15:09 +0100)
committerTobias Brunner <tobias@strongswan.org>
Thu, 3 Dec 2020 07:23:54 +0000 (08:23 +0100)
commite8fae437686ad86ca3565a52720c5bfc41671069
treea1ada0b5cacb0da4d2e232d854bedfcfc71487a6
parent4c61d7aedce5aa4ff464229da50a390a95881d3a
identification: Validate ASN.1 DN in from_data() constructor

The DN is otherwise not parsed until compared/printed.  This avoids
false detections as ASN.1 DN if e.g. an email address starts with "0",
which is 0x30 = ASN.1 sequence tag, and the next character denotes
the exact length of the rest of the string (see the unit tests for an
example).
src/libstrongswan/tests/suites/test_identification.c
src/libstrongswan/utils/identification.c