How to add extra SSL certificates in Node JS server?
For example in above diagram Node server is trying to communicate with Server A & Server B then ssl certificate of server A & B also need to be known by the Node Server.
To add the extra certificate Please follow below steps.
Set the NODE_EXTRA_CA_CERTS
in system enviroment variable.
- Create a file rootCA.pem file anywhere in system.
- Add CA certificate string in rootCA.pem file and save it.
- On your server, right-click This PC and select Properties.
- Click Advanced system settings.
- In System Properties, click Environment Variables.
- In Environment Variables, under the System variables area, click New.
- In the New System Variable dialog box, in the Variable name field, enter NODE_EXTRA_CA_CERTS and set the certificate path(rootCA.pem) as value.
- Restart your computer. This should resolve connection problems caused by sign certificates.
0 comments :
Post a Comment