Search code examples
node.jshttpsnode-redself-signed

How to pass a key, certificate, ca and


I am working with self signed certificates for the fist time. I understand that node red does not use the default ca store. The solution to this seems to be to provide a key and self signed certificate when preforming an https request. I would like to uses the standard http request node to do this but i cant find documentation on how to a key, cert, and rejectUnauthorized through the message block. Is this even possible?

Thank you


Solution

  • NodeJS bundles the default CA store into the node binary so you can't just add a file to a dir and have it pick up extra CA certs.

    Assuming you are using the HTTP-request node you can add certs/keys by ticking the "Enable secure (SSL/TLS) connection" check box.

    enter image description here

    This should make a drop down box appear that will let you create a new TLS configuration. In here you can add the certs and keys for the connection.

    enter image description here