Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty revokedCertificates in CRLs #1197

Closed
botovq opened this issue May 21, 2024 · 2 comments
Closed

Empty revokedCertificates in CRLs #1197

botovq opened this issue May 21, 2024 · 2 comments

Comments

@botovq
Copy link
Contributor

botovq commented May 21, 2024

I noticed that about 15% of CRLs in the RPKI currently contain an empty list of revoked certificates. I suspect this is a bug in either krill or rpki-rs (or both).

Per RFC 5280, section 5.1.2.6: "When there are no revoked certificates, the revoked certificates list MUST be absent."

I suspect that Revocations::to_crl_entries() returns a zero-length vector if there are no certificates to revoke

krill/src/commons/api/ca.rs

Lines 728 to 733 in 33e072e

pub fn to_crl_entries(&self) -> Vec<CrlEntry> {
self.0
.iter()
.map(|r| CrlEntry::new(r.serial, r.revocation_date))
.collect()
}

which rpki-rs's RevokedCertificates::encode_ref() then encodes as an empty sequence.

Presumably the TbsCertList either needs to turn the revoked_certs into an Option<C> or its encoding needs to handle the empty sequence specially.

@partim
Copy link
Member

partim commented Jun 11, 2024

Thank you for the report! This should be relatively easy to fix directly in rpki-rs – if the RevokedCertifcates are empty, don’t encode the outer sequence either.

@botovq
Copy link
Contributor Author

botovq commented Jul 25, 2024

Fixed in #1200 which accidentally referenced the wrong issue.

@botovq botovq closed this as completed Jul 25, 2024
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

No branches or pull requests

2 participants