This repository has been archived by the owner on Apr 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
SSL w NodeJS
Danny Paz edited this page Jun 28, 2018
·
1 revision
- Node GRPC does not support the same certs that are generated by LND, so we have to modify the lnd_btc.sh script to accomadate this
- lnd_btc needs to listen on port
0.0.0.0
for RPC or is will never reach out of the docker container - There are GRPC_SSL_CIPHER lists that need to be updated for grpc to recongnize the certs used by LND#
Beware that lnd autogenerated certificates are not compatible with current NodeJS gRPC module implementation.
Lnd uses the P-521 curve for its certificates but NodeJS gRPC module is only compatible with certificates using the P-256 curve (link).
You need to generate your own lnd certificates using the following commands (thanks to Alex Akselrod for helping me on this):
# Enter the Lnd home directory, located by default at ~/.lnd on Linux or
# /Users/[username]/Library/Application Support/Lnd/ on Mac OSX
# $APPDATA/Local/Lnd on Windows. Also change '/CN=localhost/O=lnd' to '//CN=localhost\O=lnd' if you are using Git Bash.
cd ~/.lnd
openssl ecparam -genkey -name prime256v1 -out tls.key
openssl req -new -sha256 -key tls.key -out csr.csr -subj '/CN=localhost/O=lnd'
openssl req -x509 -sha256 -days 36500 -key tls.key -in csr.csr -out tls.cert
rm csr.csr
More Info: lncli issue && cipher