Skip to content

Preserve full CA certificate chains - #219

Open
igolaizola wants to merge 1 commit into
httptoolkit:mainfrom
igolaizola:emudhra-certificates
Open

igolaizola wants to merge 1 commit into
httptoolkit:mainfrom
igolaizola:emudhra-certificates

Conversation

@igolaizola

Copy link
Copy Markdown

Keep every certificate in PEM CA bundles so TLS clients receive the issuer chain.

Tests: five chain tests and 28 certificate tests pass.

Keep every certificate in PEM CA bundles so TLS clients receive the issuer chain.

Tests: five chain tests and 28 certificate tests pass.
Copilot AI balanced review requested due to automatic review settings October 22, 2026 19:11
@CLAassistant

CLAassistant commented Oct 22, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is narrowly scoped, preserves signing behavior, and includes regression coverage for both TLS setup paths with no unresolved findings.

No open issues 🎉

What changed in this PR

Preserves full PEM CA bundles when generating certificates so TLS clients receive the complete supplied issuer chain, while retaining the first certificate for signing.

Changes:

  • Stores and returns the original CA bundle instead of only its first certificate.
  • Adds five regression tests covering chain retention and TLS connections using PEM data or file paths, with and without SNI.
File Description
test/​integration/​https-chain.spec.ts Adds multi-intermediate chain tests across TLS configuration variants.
src/​util/​certificates.ts Preserves the full CA bundle in generated certificate results.

Review effort: Balanced

This branch has not been deployed

No deployments
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