Skip to content

doc: NODE_EXTRA_CA_CERTS Override #3502

Closed as not planned
Closed as not planned
@nomanmaqsood

Description

@nomanmaqsood

Hello

I need a little help to set a self signed certificate in Nodejs. I have been doing research on this for many days and found a working solution in one of the GitHub issues of nodejs

This is how I am setting global options

    const CA_STORE = await getCertificate()
    https.globalAgent.options.ca = [];

    https.globalAgent.options.ca.push(CA_STORE)

The solution really set the self signed certificate into node.js process but the problem is it overrides the default trusted certificates of Nodejs and my other Axios call that are using public certificates stop working.

I cannot use NODE_EXTRA_CA_CERTS because I cannot set its value runtime (I am reading the certificate from s3)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions