Skip to content

chore(build): enable system CA trust in pkg binary#1046

Open
hsablonniere wants to merge 1 commit intomasterfrom
clever-multi-profile-system-cert
Open

chore(build): enable system CA trust in pkg binary#1046
hsablonniere wants to merge 1 commit intomasterfrom
clever-multi-profile-system-cert

Conversation

@hsablonniere
Copy link
Copy Markdown
Member

Summary

The CLI binary now uses --options use-system-ca when built with @yao-pkg/pkg to load CA certificates from the operating system certificate store.

This resolves SSL certificate chain errors (Error: self signed certificate in certificate chain) in enterprise environments where internal/corporate CAs are installed at the OS level but not recognized by Node.js's bundled Mozilla CAs.

Technical Details

  • Node.js Feature: --use-system-ca flag (available in Node.js 22.15.0+, 23.9.0+)
  • How it works: Node.js loads system CAs from:
    • Windows: Windows Certificate Store
    • macOS: macOS Keychain
    • Linux: /etc/ssl/certs/, SSL_CERT_FILE, or SSL_CERT_DIR
  • Build Tool: @yao-pkg/pkg passes the option via --options use-system-ca
  • Project Node version: 22.17.0 ✅ (compatible)

Testing

The binary will now accept both bundled and system-installed CA certificates.

@hsablonniere hsablonniere requested a review from a team as a code owner February 13, 2026 11:13
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 13, 2026

🔎 A preview has been automatically published!

If you created the alias to the preview script, you can run this command to download and install this preview:

clever-preview update clever-multi-profile-system-cert

You can also run it from your local repository:

./scripts/preview.js update clever-multi-profile-system-cert
OS SHA256 checksum
🐧 linux 0e67c8f10d37005a5e1d576077aa68704e7e6d68cbf33f138267cf1f8c22e5ee
🍏 macos 66358cfe3df96ce835c1dbe56152c569ae8eed4f327d1e8dcae55270003d9f20
🪟 win ffbc484b7bf51104f8c35094f1b9837da785358ce545562b8cd3e9d2bd132fee

This preview will be deleted once this PR is closed.

@hsablonniere hsablonniere added this to the 4.7.0 milestone Feb 16, 2026
The CLI binary now uses NODE_USE_SYSTEM_CA behavior to load CA certificates
from the operating system certificate store alongside Node.js's bundled
Mozilla CAs. This resolves SSL certificate chain errors in enterprise
environments with internal/corporate CAs installed at the OS level.
@hsablonniere hsablonniere force-pushed the clever-multi-profile-system-cert branch from f968b1d to bfe150a Compare March 3, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant