NODE_EXTRA_CA_CERTS cannot be set in code or relative · Issue #20432 · nodejs/node (original) (raw)
- Version:
v9.11.1 - Platform:
Darwin sheerun.dev 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64 i386 MacBookPro12,1 Darwin
When I start my server with
NODE_EXTRA_CA_CERTS=/Users/sheerun/Source/Ada/search/.certs/ca.crt bin/start
and in code make request to http server that serves with given certificate, all is good
But when I set it at the beginning of bin/start
as so:
process.env.NODE_EXTRA_CA_CERTS = "/Users/sheerun/Source/Ada/search/.certs/ca.crt"
then node complains that there's "self signed certificate in certificate chain".
Particularly NODE_EXTRA_CA_CERTS doesn't work when I use dotenv
package and set NODE_EXTRA_CA_CERTS in .env
file.
Also, it seems NODE_EXTRA_CA_CERTS doesn't allow relative path, just absolute.
I think both of these issues should be addressed or at least documented with reasons why.