Name Constraints cert chain walk#10687
Open
rlm2002 wants to merge 2 commits into
Open
Conversation
|
retest this please |
|
95ec6df to
4c99169
Compare
Contributor
Author
|
Retest this please Jenkins: PRB-fips-repo-and-harness-test-v3-part2 failure |
f6e930f to
6e9bc5e
Compare
Contributor
Author
|
Retest this please Jenkins: PRB-fips-repo-and-harness-test-v3-part2 returned failure (FAIL-ingish...) |
1fa102a to
92ac05b
Compare
- Ancestor walk added to ParseCertRelative
- FindSignerByAkidOrName helper: AKID->SKID with name-hash
validation, name-only fallback only when AKID is absent
- Signer fields: authKeyIdSet, authKeyIdHash
- issuerNameHash ifdef widened to include !IGNORE_NAME_CONSTRAINTS
- WOLFSSL_MAX_CHAIN_DEPTH macro (default 20)
- Self-loop and A->B->A cycle termination
- CN-as-DNS fallback in ConfirmNameConstraints gated on !cert->isCA
- test_wolfSSL_CertManagerNameConstraint_valid_chain - test_wolfSSL_CertManagerNameConstraint_skid_disambiguates - Cert/key fixtures under certs/test/nc-ancestor/ - gen-nc-ancestor.sh to regenerate from committed keys
92ac05b to
0052ec4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implements chain walk to
ParseCertRelativeto perform Name Constraints check for certificate ancestors which applies every ancestor CA's name constraints to the cert under verification, per RFC 5280 §4.2.1.10. Previously only the immediate signer's NCs were enforced.Walk runs whenever
cert->cais set and verification is enabled.FindSignerByAkidOrNamehelper performs AKID→SKID lookup withsubjectNameHashvalidation. Lookup falls back to name-only when cert has no AKID extension.NO_SKIDbuilds cannot disambiguate same-DN sibling CAs in the CM.issuerNameHashifdef widened to include!IGNORE_NAME_CONSTRAINTSAdds
authKeyIdHash+authKeyIdSettoSignerfor AKID parent lookup.WOLFSSL_MAX_CHAIN_DEPTHmacro (default 20) bounds the walk and provides cycle/depth protection. Walk also terminates on self-loops and A→B→A two-step cycles.CN-as-DNS fallback in
ConfirmNameConstraintsnow skips CA certs since the convention (RFC 6125 §6.4.4) is scoped to leaf service identityAdds regression tests and supporting cert chain.
test_wolfSSL_CertManagerNameConstraint_skid_disambiguatesloads a permissive same-DN sibling alongside the strict NC-bearing CA, requiring AKID→SKID disambiguation to pick the real signertest_wolfSSL_CertManagerNameConstraint_valid_chainverifies a leaf is accepted under a grandparent's permitted URI and rejected when violating itcerts/test/nc-ancestor/withgen-nc-ancestor.shto regenerate from committed keys. SKID hash-table rows are pinned so the AKID-vs-name behavior is reproducibly observableFixes zd#21877, #21879, #21895
Testing
./configure --enable-all && make checkChecklist