Skip to content

Add nc testcase for a present-but-empty excludedSubtrees - #660

Open
avalyset wants to merge 2 commits into
C2SP:mainfrom
avalyset:nc/excluded-empty-sequence
Open

Add nc testcase for a present-but-empty excludedSubtrees#660
avalyset wants to merge 2 commits into
C2SP:mainfrom
avalyset:nc/excluded-empty-sequence

Conversation

@avalyset

@avalyset avalyset commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Adds rfc5280::nc::permitted-nonempty-excluded-empty-sequence, the mirror of permitted-empty-sequence-excluded-nonempty from #658: a non-empty permittedSubtrees alongside an excludedSubtrees that is present but empty. Both shapes are rejected by the same section of RFC 5280, but only the first had a testcase, so the second branch of the check has had no vector behind it. Split out from pyca/cryptography#15560, where @alex preferred these tests live in limbo rather than as Rust unit tests; pyca/cryptography 50.0.1 accepts the chain today.

@woodruffw

Copy link
Copy Markdown
Collaborator

Noting that basically no validators reject this at the moment:

https://github.com/C2SP/x509-limbo/actions/runs/33657818364?pr=660#summary-100340670046

Given that, I think perhaps we should give it the pedantic-rfc5280 flag?

@cpu

cpu commented Sep 2, 2026

Copy link
Copy Markdown
Member

Noting that basically no validators reject this at the moment:

None that are released 😆 rustls/webpki#535

Given that, I think perhaps we should give it the pedantic-rfc5280 flag?

I think that's reasonable.

@woodruffw woodruffw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just blocking until above is addressed.

@woodruffw

Copy link
Copy Markdown
Collaborator

@avalyset Please rebase, thanks.

@avalyset

avalyset commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Agreed. I've added pedantic-rfc5280 to permitted-nonempty-excluded-empty-sequence and added the features field in limbo.json. Lint is clean and no existing testcase changes result. Pushing now.

avalyset and others added 2 commits September 2, 2026 20:12
Mirrors permitted-empty-sequence-excluded-nonempty from C2SP#658: a non-empty
permittedSubtrees alongside an excludedSubtrees that is present but empty.
Both shapes are rejected by RFC 5280 4.2.1.10, but only the first had a
vector behind it.

limbo.json carries only the new entry; the existing testcases are untouched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
No validator currently rejects a present-but-empty excludedSubtrees, so the
testcase gets the same treatment as the other RFC 5280 corners that are widely
ignored in practice.

limbo.json carries only the added features field; the certificates are left as
generated, since a full recompile rewrites unrelated keys and serials without
changing any testcase.
@avalyset
avalyset force-pushed the nc/excluded-empty-sequence branch from 34e527a to 5f1888c Compare September 2, 2026 18:13
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.

3 participants