alexandrainst / node-red-contrib-postgresql

Node-RED node for PostgreSQL, supporting parameters, split, back-pressure
https://flows.nodered.org/node/node-red-contrib-postgresql
Apache License 2.0
31 stars 13 forks source link

Can't get SSL CA file to work with config #68

Closed pbrunier closed 23 hours ago

pbrunier commented 4 months ago

Hi, I have a self-signed CA and want to load the CA file into the config of this node. Now have it working with {"rejectUnauthorized": false} in the SSL options, but whatever I do, I don't get the ca file to be accepted. Doesn't seem to do anything.

Tried: { "rejectUnauthorized": true and false, "ca": "/path/to/file" } -AND- { "rejectUnauthorized": true and false, "ca": "COMPLETE_CA_CERT_STRING" }

When rejectUnauthorized is set to false it always works. When set to true it doesn't work. The only message that shows up is: Error: self-signed certificate in certificate chain I don't get an error stating that the CA file cannot be found or is invalid, suspecting that that part of the config isn't used.

Version: 0.14.0

Thanks in advance for your help.

evan-neres commented 1 day ago

You can insert the certificate using JSON image

It is important that you insert the /n tag so that the node understands the beginning and end of the certificate. image

pbrunier commented 23 hours ago

Thank you!