Skip to content

Name Constraints cert chain walk#10687

Open
rlm2002 wants to merge 2 commits into
wolfSSL:masterfrom
rlm2002:zd-NameConstraints
Open

Name Constraints cert chain walk#10687
rlm2002 wants to merge 2 commits into
wolfSSL:masterfrom
rlm2002:zd-NameConstraints

Conversation

@rlm2002

@rlm2002 rlm2002 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Description

Implements chain walk to perform Name Constraints check for certificate ancestors.
Walks the cert chain in ParseCertRelative and applies each ancestor CA's name constraints to the leaf. Previously only the immediate signer's constraints were checked, so higher-level CA constraints were not enforced.

Parent lookup prefers AKID→SKID (validated against issuer name) and falls back to name-only; NO_SKID builds are name-only and cannot disambiguate same-DN sibling CAs in the CM.

Adds authKeyIdHash + authKeyIdSet to Signer (populated in FillSigner from the cert's AKID) so the walk can locate each ancestor's parent by SKID via GetCA, rather than relying on issuer name alone.

Adds regression tests and supporting cert chain undercerts/test/nc-ancestor/.

Fixes zd#21877, #21879, #21895

Testing

./configure --enable-all && make check

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@rlm2002 rlm2002 self-assigned this Jun 15, 2026
@rlm2002 rlm2002 marked this pull request as ready for review June 15, 2026 20:01
@github-actions

Copy link
Copy Markdown

retest this please

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

gcc-arm-cortex-m0plus

  • FLASH: .text +164 B (+0.3%, 63,659 B / 262,144 B, total: 24% used)

gcc-arm-cortex-m3

  • FLASH: .text +184 B (+0.2%, 121,581 B / 262,144 B, total: 46% used)

gcc-arm-cortex-m4

  • FLASH: .text +192 B (+0.1%, 199,248 B / 262,144 B, total: 76% used)

gcc-arm-cortex-m4-baremetal

  • FLASH: .text +192 B (+0.3%, 66,251 B / 262,144 B, total: 25% used)

gcc-arm-cortex-m4-crypto-only

  • FLASH: .text +128 B (+0.1%, 173,806 B / 262,144 B, total: 66% used)

gcc-arm-cortex-m4-dtls13

  • FLASH: .text +192 B (+0.1%, 179,928 B / 1,048,576 B, total: 17% used)

gcc-arm-cortex-m4-min-ecc

  • FLASH: .text +128 B (+0.2%, 61,165 B / 262,144 B, total: 23% used)

gcc-arm-cortex-m4-openssl-compat

  • FLASH: .text +256 B (+0.0%, 767,988 B / 1,048,576 B, total: 73% used)

gcc-arm-cortex-m4-pkcs7

  • FLASH: .text +128 B (+0.1%, 211,441 B / 262,144 B, total: 81% used)

gcc-arm-cortex-m4-pq

  • FLASH: .text +128 B (+0.0%, 278,072 B / 1,048,576 B, total: 27% used)

gcc-arm-cortex-m4-rsa-only

  • FLASH: .text +192 B (+0.1%, 323,672 B / 1,048,576 B, total: 31% used)

gcc-arm-cortex-m4-sp-math

  • FLASH: .text +128 B (+0.2%, 61,165 B / 262,144 B, total: 23% used)

gcc-arm-cortex-m4-tls12

  • FLASH: .text +192 B (+0.2%, 122,317 B / 262,144 B, total: 47% used)

gcc-arm-cortex-m4-tls13

  • FLASH: .text +192 B (+0.1%, 234,882 B / 262,144 B, total: 90% used)

gcc-arm-cortex-m7

  • FLASH: .text +128 B (+0.1%, 199,184 B / 262,144 B, total: 76% used)

gcc-arm-cortex-m7-pq

  • FLASH: .text +128 B (+0.0%, 278,648 B / 1,048,576 B, total: 27% used)

gcc-arm-cortex-m7-tls13

  • FLASH: .text +128 B (+0.1%, 234,882 B / 262,144 B, total: 90% used)

stm32-sim-stm32h753

…r cert

Add to Signer struct to retrieve AKID data in NC cert walk
@rlm2002 rlm2002 force-pushed the zd-NameConstraints branch from 95ec6df to 4c99169 Compare June 16, 2026 19:09
@rlm2002

rlm2002 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Retest this please Jenkins: PRB-fips-repo-and-harness-test-v3-part2 failure

@rlm2002 rlm2002 force-pushed the zd-NameConstraints branch from 4c99169 to f6e930f Compare June 16, 2026 23:31
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.

1 participant