Skip to content

Add documentation for NAME_CONSTRAINTS_check#31334

Draft
bob-beck wants to merge 3 commits into
openssl:masterfrom
bob-beck:name-constraints-doc
Draft

Add documentation for NAME_CONSTRAINTS_check#31334
bob-beck wants to merge 3 commits into
openssl:masterfrom
bob-beck:name-constraints-doc

Conversation

@bob-beck
Copy link
Copy Markdown
Contributor

We document which names and name constraints will be evaluated
as well as the limits that will be placed on the evaluation on
a per certificate basis.

We call out in the BUGS section that the RFC 5280 requires a byte
per byte match of name constraints unless the higher level protocol
has defines a different matching method for wildcards. This
"deferral of specification" and corresponding lack of specification
by upper level protocols means that across implementations encountering
the default behaviour is to be expected, and that therefore relying
on excluded names to constrain signers in a PKI from signing wildcards
for security purposes is ill advised.

This is then cross referenced in the documentation for X509_verify_cert
and the maximum possible comparisons which can be forces in a certificate
validtion noted in the BUGS section of X509_verify_cert.

Fixes: #30706

Checklist
  • documentation is added or updated
  • tests are added or updated

bob-beck added 2 commits May 28, 2026 04:44
I am doing this because I have need to add information that really does
belong here, and the current stuff is less documentation than more or
less some hand waving about how it works without any details

So to summarize the changes:

1) This documents the current way that X509_verify_cert goes about
building and verifying a chain, identifying the relevant flags that
can affect how this happens today, and cross references the correct page
to find the rest of the exhaustive list of verification flags and what they do.

2) This documents the verification callback and how it can be used
to affect the verification outcome, This includes warning potential
users of the callback of what returning values from it means,
the common ways to end up unintentionaly doing things you did not expect
with the callback, and that it depends upon internals and should not be
relied upon.
@bob-beck
Copy link
Copy Markdown
Contributor Author

Based on #31314 - so hold until that lands and will rebase.

@bob-beck bob-beck added the hold: need rebase The pull request needs to be rebased label May 29, 2026
@bob-beck bob-beck force-pushed the name-constraints-doc branch from c8639ae to e440945 Compare May 29, 2026 13:44
@openssl-machine openssl-machine added the approval: review pending This pull request needs review by a committer label May 29, 2026
@bob-beck bob-beck requested review from t8m and vdukhovni May 29, 2026 13:44
We document which names and name constraints will be evaluated
as well as the limits that will be placed on the evauluation on
a per certificate basis.

We call out in the BUGS section that the RFC 5280 requires a byte
per byte match of name constraints unless the higher level protocol
has defines a different matching method for wildcards. This
"deferall of specification" and corresponding lack of specification
by upper level protocols means that across implementations encountering
the default behaviour is to be expected, and that therefore relying
on excluded names to constrain signers in a PKI from signing wildcards
is ill advised.

This is then cross referenced in the documentation for X509_verify_cert
and the maximum possible comparisons which can be forces in a certificate
validtion noted in the BUGS section of X509_verify_cert.

Fixes: openssl#30706
@bob-beck bob-beck force-pushed the name-constraints-doc branch from e440945 to ab37459 Compare May 29, 2026 14:08
@t8m t8m added triaged: documentation The issue/pr deals with documentation (errors) branch: 3.0 Applies to openssl-3.0 branch branch: 3.4 Applies to openssl-3.4 branch: 3.5 Applies to openssl-3.5 branch: 3.6 Applies to openssl-3.6 branch: 4.0 Applies to openssl-4.0 tests: exempted The PR is exempt from requirements for testing labels May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: review pending This pull request needs review by a committer branch: 3.0 Applies to openssl-3.0 branch branch: 3.4 Applies to openssl-3.4 branch: 3.5 Applies to openssl-3.5 branch: 3.6 Applies to openssl-3.6 branch: 4.0 Applies to openssl-4.0 hold: need rebase The pull request needs to be rebased tests: exempted The PR is exempt from requirements for testing triaged: documentation The issue/pr deals with documentation (errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document that wildcards in DNS SAN can bypass exclusions by name constraints

3 participants