edge microgateway SSL error

Not applicable

I am trying to build a simple proxy with a simple GET call to retrieve data. The Backend API has a self signed certificate which is resulting in a


"Self Signed Certificate in chain" error

I imported their cerificate in my server but it was still showing the same error.

I tried to disable the certificate check in edge microgateway by modifying the network.js file in "edgemicro/node_modules/microgateway-config/lib" directory.

In the above mentioned JS file, I set the opts['rejectUnauthorized'] = false; but even that did not work.

I want to know if there is a way to disable the certificate check in microgateway.

0 2 662
2 REPLIES 2

Former Community Member
Not applicable

You shouldn't be trying to modify the js files directly. Setting "rejectUnauthorized" to false is available via config files.

CAUTION: Not to be used in production

To turn off certificate check in node.js, use

export NODE_TLS_REJECT_UNAUTHORIZED = 0

If this is not something you want to do, you may need a CA file so node can trust the signers.

ericschult
Participant II

Node 7.3.0 added NODE_EXTRA_CA_CERTS, which allows you to add additional CAs to node's trusted list. I've never used it with self-signed certs but it may be worth a shot. You'll need node 7.3 or higher.

https://nodejs.org/en/blog/release/v7.3.0/

https://nodejs.org/api/cli.html#cli_node_extra_ca_certs_file