{"action":"created","issue":{"url":"https://api.github.com/repos/lightningnetwork/lnd/issues/795","repository_url":"https://api.github.com/repos/lightningnetwork/lnd","labels_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/795/labels{/name}","comments_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/795/comments","events_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/795/events","html_url":"https://github.com/lightningnetwork/lnd/issues/795","id":301676816,"number":795,"title":"SSL problem with grpc when connecting from node.js","user":{"login":"Metalsprzet","id":36126798,"avatar_url":"https://avatars3.githubusercontent.com/u/36126798?v=4","gravatar_id":"","url":"https://api.github.com/users/Metalsprzet","html_url":"https://github.com/Metalsprzet","followers_url":"https://api.github.com/users/Metalsprzet/followers","following_url":"https://api.github.com/users/Metalsprzet/following{/other_user}","gists_url":"https://api.github.com/users/Metalsprzet/gists{/gist_id}","starred_url":"https://api.github.com/users/Metalsprzet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metalsprzet/subscriptions","organizations_url":"https://api.github.com/users/Metalsprzet/orgs","repos_url":"https://api.github.com/users/Metalsprzet/repos","events_url":"https://api.github.com/users/Metalsprzet/events{/privacy}","received_events_url":"https://api.github.com/users/Metalsprzet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-02T07:29:05Z","updated_at":"2018-03-02T08:55:44Z","closed_at":null,"author_association":"NONE","body":"After upgrade lnd we have problem with connect from node.js by gprc.\r\n\r\nNew tls.cert and tls.key was generated ( we delete old ones before run lnd after update ) \r\n\r\nError  3261 ssl_transport_security.cc:979] Handshake failed with fatal error SSL_ERROR_SSL: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure.\r\n\r\nPart of code in node.js: ( which work before lnd update )\r\n\r\nconst lndCert \t\t\t= fs.readFileSync(\"/home/administrator/.lnd/tls.cert\")\r\nconst credentials \t\t= grpc.credentials.createSsl(lndCert)\r\nconst lnrpcDescriptor \t= grpc.load(\"rpc.proto\")\r\nconst lnrpc \t\t\t= lnrpcDescriptor.lnrpc\r\n\r\nvar metadata = new grpc.Metadata();\r\nconst macaroonHex = fs.readFileSync(\"/home/administrator/.lnd/admin.macaroon\").toString(\"hex\");\r\nmetadata.add('macaroon', macaroonHex);\r\n\r\nconst macaroonCreds = grpc.credentials.createFromMetadataGenerator((params, callback) =>\r\n    callback(null, metadata)\r\n)\r\n\r\nconst creds = grpc.credentials.combineChannelCredentials(credentials, macaroonCreds);\r\n\r\nconst lightning = new lnrpc.Lightning('localhost:10009', creds)"},"comment":{"url":"https://api.github.com/repos/lightningnetwork/lnd/issues/comments/369860729","html_url":"https://github.com/lightningnetwork/lnd/issues/795#issuecomment-369860729","issue_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/795","id":369860729,"user":{"login":"Metalsprzet","id":36126798,"avatar_url":"https://avatars3.githubusercontent.com/u/36126798?v=4","gravatar_id":"","url":"https://api.github.com/users/Metalsprzet","html_url":"https://github.com/Metalsprzet","followers_url":"https://api.github.com/users/Metalsprzet/followers","following_url":"https://api.github.com/users/Metalsprzet/following{/other_user}","gists_url":"https://api.github.com/users/Metalsprzet/gists{/gist_id}","starred_url":"https://api.github.com/users/Metalsprzet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metalsprzet/subscriptions","organizations_url":"https://api.github.com/users/Metalsprzet/orgs","repos_url":"https://api.github.com/users/Metalsprzet/repos","events_url":"https://api.github.com/users/Metalsprzet/events{/privacy}","received_events_url":"https://api.github.com/users/Metalsprzet/received_events","type":"User","site_admin":false},"created_at":"2018-03-02T08:55:44Z","updated_at":"2018-03-02T08:55:44Z","author_association":"NONE","body":"I decoded certificate for see more\r\n\r\nCertificate:\r\n    Data:\r\n        Version: 3 (0x2)\r\n        Serial Number:\r\n            84:c6:..........................\r\n    Signature Algorithm: ecdsa-with-SHA256\r\n        Issuer: O=lnd autogenerated cert, CN=ubuntu\r\n        Validity\r\n            Not Before: Feb 28 16:28:11 2018 GMT\r\n            Not After : Apr 25 16:28:11 2019 GMT\r\n        Subject: O=lnd autogenerated cert, CN=ubuntu\r\n        Subject Public Key Info:\r\n            Public Key Algorithm: id-ecPublicKey\r\n                Public-Key: (256 bit)\r\n                pub:\r\n                    04:7b:ff:05..........\r\n                ASN1 OID: prime256v1\r\n                NIST CURVE: P-256\r\n        X509v3 extensions:\r\n            X509v3 Key Usage: critical\r\n                Digital Signature, Key Encipherment, Certificate Sign\r\n            X509v3 Basic Constraints: critical\r\n                CA:TRUE\r\n            X509v3 Subject Alternative Name:\r\n                DNS:ubuntu, DNS:localhost, IP Address:127.0.0.1, IP Address:0:0:0:0:0:0:0:1, IP Address:192.168.0.40, IP Address......\r\n    Signature Algorithm: ecdsa-with-SHA256\r\n         30:44:...\r\n"}}
{"actor":{"display_login":"Metalsprzet"}}