altangent / lnd-async

Lightning Network Daemon gRPC async client
MIT License
21 stars 12 forks source link

TLS handshake error when connecting to LND #1

Closed bmancini55 closed 6 years ago

bmancini55 commented 6 years ago

After updating an LND node to the latest source I'm getting the following error when connecting:

E0225 00:04:47.681324000 140735946404672 ssl_transport_security.cc:187] ssl_info_callback: error occured.

E0225 00:04:47.681593000 140735946404672 ssl_transport_security.cc:976] Handshake failed with fatal error SSL_ERROR_SSL: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure.
bmancini55 commented 6 years ago

The issue was caused by removal of RSA cipher suites from the auto-generated certs. LND now only generates elliptic curve certs as of Feb 24 2018 via this commit: https://github.com/lightningnetwork/lnd/commit/f7eeea71e206a514ee649060e903f72c9d4a8c46

The fix is to change gRPC to use the correct cipher suites which can be accomplished via the GRPC_SSL_CIPHER_SUITES environment variable as defined here: https://github.com/grpc/grpc/blob/master/doc/environment_variables.md

Resolve by setting env variable to HIGH+ECDSA as defined here: https://www.openssl.org/docs/man1.0.2/apps/ciphers.html