Skip to content

Use system certificate store when running under Windows #51537

@jupjohn

Description

@jupjohn

What is the problem this feature will solve?

Currently, when servers present certificates that are signed by a self-signed CA (e.g. a corporate HTTPS inspection firewall, or an internal NPM registry) AND the CA certificate is present in the Windows certificate store, the connection will fail due to CA root verification. This is most noticeable when installing packages via NPM behind corporate proxies - ending up in installation failing due to cert verification.

What is the feature you are proposing to solve the problem?

In OpenSSL 3.2, support was added to use the Windows cert store as OpenSSL's CA store. While node currently doesn't use 3.2, when it eventually makes the move I would suggest defaulting the cert store to org.openssl.winstore:// - allowing any CA root certs to be picked up from the system.

What alternatives have you considered?

  • Manually extract certificates from the Windows certificate store and pass to OpenSSL on process init (may require privilege escalation, no thanks)
  • Export all Windows certificates and load them using NODE_EXTRA_CA_CERTS (works, but would be one less thing to worry about if the Windows cert store was used)

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.

    Type

    No type

    Projects

    Status

    Awaiting Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions