Error: self-signed certificate in certificate chain
getting the above error. heres my code:
i already added sslmode=require and rejectedUnaurhotized at the end of connection string as well
1 Reply
The machine your code is running on likely does not trust the certificates the database is providing.
You need to install the CA cert that signed the DB certs on your machine or provide a path to the same CA cert in your connection options.
See the
ca field in https://haxefoundation.github.io/hxnodejs/js/node/tls/SecureContextOptions.html
How get the CA certs depends on how your DB is configured.