Skip to content

look up indirect CRL entries by issuer and serial number - #2464

Open
rootvector2 wants to merge 1 commit into
bcgit:mainfrom
rootvector2:indirect-crl-entry-lookup
Open

rootvector2 wants to merge 1 commit into
bcgit:mainfrom
rootvector2:indirect-crl-entry-lookup

Conversation

@rootvector2

Copy link
Copy Markdown
Contributor

getCertStatus in the three cert path validator copies found a certificate's entry in an indirect CRL with getRevokedCertificate(serial) and compared only the issuer of whichever entry came first, so when another issuer's entry with the same serial number preceded the certificate's own (a serial number is only unique within its issuer, and aggregating issuers is what an indirect CRL is for) the revoked certificate validated; found reading the RFC 5280 sec. 5.3.3 handling in the validators, the lookup now checks every entry carrying the serial number against the issuer it applies to, X509CRLImpl implements the JDK's getRevokedCertificate(X509Certificate) the same way instead of inheriting the single-issuer default, and X509CRLEntryObject.equals keeps two identically encoded entries under different issuers apart so getRevokedCertificates() no longer drops one, with IndirectCRLSerialCollisionTest covering the provider validator, X509RevocationChecker and the direct lookup, failing without the change.

AI tooling was used to help prepare this change.

throws Exception
{
KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", "BC");
kpg.initialize(1024);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants