Skip to content

Fix certificate path building at trust anchors - #11

Merged
Scratch-net merged 2 commits into
mainfrom
fix/certificate-path-building
Aug 30, 2026
Merged

Fix certificate path building at trust anchors#11
Scratch-net merged 2 commits into
mainfrom
fix/certificate-path-building

Conversation

@Scratch-net

@Scratch-net Scratch-net commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Description

  • Build the certificate path from the leaf and stop after a trusted issuer validates the current certificate.
  • Prefer trust-store issuers over redundant server-supplied cross-signs.
  • Normalize distinguished names and use AKI/SKI values to disambiguate issuer keys.
  • Add regression coverage and bump the package version to 0.1.4.
  • Renew the localhost test certificate through August 29, 2036.

Testing (ignore for documentation update)

  • npm run build
  • npm run lint
  • npm run test:pure-js (50 tests passed)
  • npm run test:webcrypto (50 tests passed)
  • npm pack --dry-run

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist:

Additional Notes:

The regression reproduces a chain that contains a trusted root cross-signed by an untrusted legacy root. It also generates certificates whose issuer and subject DNs differ in case and insignificant spacing, with matching and mismatching key identifiers.

Prefer trust-store issuers when building from the leaf so server-supplied cross-signs beyond a valid anchor are ignored.

Normalize issuer DNs and use AKI/SKI to disambiguate matching CA keys.
The previous fixture expired on 2026-07-29 and left TLS integration tests waiting until the CI timeout.
@Scratch-net
Scratch-net merged commit 93b9a3e into main Aug 30, 2026
4 checks passed
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.

2 participants