Hi,
I am trying to use NodeJS to connect to the backend over https. Using the request module to connect
var options = { url: 'https:xxxx.com', method:'POST', cert: fs.readFileSync(__dirname + '/xxxx.cer', 'utf-8'), key: fs.readFileSync(__dirname + '/xxxx.key', 'utf-8'), agent: false, rejectUnauthorized: false, auth:{ 'password':'xxx.' } };
It works perfectly fine...My question is should I have the cer/pem files in a directory or is there a way to use the keystore...
We have different certificates for production and other environments. what is the best way to manage the certificates.
Thanks in advance
Apigee node.js does not allow a way to access the keystore, truststore on Edge.
To manage certs for different environments, you can use deploy time (CI/CD tools) to bundle the right certificate for a specific environment. So only the right certs are present in the bundle for an environment.
Hi,
Thanks for coming back..
where should we store the certificate files?
Thanks
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |