]> git.ipfire.org Git - thirdparty/strongswan.git/commit
revocation: Validate OCSP nonce only if response actually contains a nonce
authorMartin Willi <martin@strongswan.org>
Mon, 10 Aug 2020 16:29:52 +0000 (18:29 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 27 Oct 2020 09:51:51 +0000 (10:51 +0100)
commit7efe92130a1c8ae3c8c16147ead5b2ed95437339
tree54ba25228fdba139fc064bc3d3a4dc5933077459
parent706a579e96538c5ea8205870ef9026fa0c458e33
revocation: Validate OCSP nonce only if response actually contains a nonce

Commit 27756b081c1b8 (revocation: Check that nonce in OCSP response matches)
introduced strict nonce validation to prevent replay attacks with OCSP
responses having a longer lifetime. However, many commercial CAs (such as
Digicert) do not support nonces in responses, as they reuse once-issued OCSP
responses for the OCSP lifetime. This can be problematic for replay attack
scenarios, but is nothing we can fix at our end.

With the mentioned commit, such OCSP responses get completely unusable,
requiring the fallback to CRL based revocation. CRLs don't provide any
replay protection either, so there is nothing gained security-wise, but may
require a download of several megabytes CRL data.

To make use of replay protection where available, but fix OCSP verification
where it is not, do nonce verification only if the response actually contains
a nonce. To be safe against replay attacks, one has to fix the OCSP responder
or use a different CA, but this is not something we can enforce.

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