]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix regression when X509_V_FLAG_CRL_CHECK_ALL is set, while X509_V_FLAG_CRL_CHECK...
authorCarter Thaxton <carter.thaxton@gmail.com>
Thu, 9 Oct 2025 02:20:25 +0000 (19:20 -0700)
committerTomas Mraz <tomas@openssl.org>
Thu, 11 Dec 2025 11:40:57 +0000 (12:40 +0100)
commit996d50da8fac4938fd910af96389c1e67ff1cb11
tree372055059e1a0506d8fc043865b4f924b2a6a5e7
parente7d5206e892e14fd380e3f04401a47de7c759818
Fix regression when X509_V_FLAG_CRL_CHECK_ALL is set, while X509_V_FLAG_CRL_CHECK is clear

Fixes #28758

When X509_V_FLAG_CRL_CHECK is not set, the man pages document that X509_V_FLAG_CRL_CHECK_ALL is ignored.
Prior to 3.6.0, this was indeed the case.

In 3.6.0, the behavior changed, and setting X509_V_FLAG_CRL_CHECK_ALL began to imply X509_V_FLAG_CRL_CHECK.
This unfortunately breaks the majority of ruby installations, which relied on the documented behavior.

For consistency, this commit applies the same logic to the new X509_V_FLAG_OCSP_RESP_CHECK and X509_V_FLAG_OCSP_RESP_CHECK_ALL flags,
which are still undocumented as of 3.6.0.

All existing tests continue to pass.  They also make the assumption that the xxx_CHECK_ALL flags are irrelevant unless xxx_CHECK is set.
We could add a new test for this regression.  I'll leave that to another commit.

CLA: trivial

Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28797)

(cherry picked from commit cbaf28ce48805f47345f39dc6aaf39e181ab4861)
crypto/x509/x509_vfy.c