]> git.ipfire.org Git - thirdparty/strongswan.git/commit
revocation: Skip any zero bytes when comparing serials in CRLs
authorTobias Brunner <tobias@strongswan.org>
Wed, 24 Jan 2018 13:42:28 +0000 (14:42 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 31 Jan 2018 09:50:41 +0000 (10:50 +0100)
commit432358cf49cbdfab507bec5341c9f5f36f390470
tree6eab635dff1181280bbd5aa54dc830f259df6396
parenta8e940ade2b6ec93cf195494a4657204a8b3203b
revocation: Skip any zero bytes when comparing serials in CRLs

Depending on the plugins that eventually parse the certificate and CRL,
serials with MSB set (i.e. negative numbers that have a zero byte prefixed
when encoded as ASN.1 INTEGER) might have (x509 plugin) or not have
(openssl plugin) a zero byte prefix when returned by get_serial() or
enumerated from the CRL.  Strip them before doing the comparison or
revocation checking might fail if not both credentials are parsed by the
same plugin (which should be rare and only happen if parsing of either
cert or CRL fails with one of the plugins and there is a fallback to the
implementation provided by the other plugin).

Fixes #2509.
src/libstrongswan/plugins/revocation/revocation_validator.c