gabidi / cyphernode-js-sdk

Isomorphic Javascript Cyphernode SDK for Bitcoin, C-lightning and OTS
MIT License
9 stars 2 forks source link

Self signed cert issue #13

Closed cryptoskillz closed 4 years ago

cryptoskillz commented 4 years ago

Hello,

I get the following issue every time I try to use this package with cyphernode

(node:7124) UnhandledPromiseRejectionWarning: Error: self signed certificate

image

I believe this is to do with trakek self-signed certificate as chrome also gives issues.

I tried the "fix" as suggested by users on stack overflow but to no avail

NODE_TLS_REJECT_UNAUTHORIZED=0

gabidi commented 4 years ago

Hey, thanks for the feedback :) Latest release https://github.com/gabidi/cyphernode-js-sdk/releases/tag/0.0.6 addresses this by allowing you to supply the contents Cyphernode's pem ca as an environment variable, ex:

CYPHERNODE_GATEKEEPER_CERT_CA=$(cat path/to/cyphernode/dist/cyphernode/gatekeeper/certs/cert.pem) node yourapp.js

Hope that helps.