From f5a981330471115a7a56740d673d3ccda14fcd28 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Mon, 13 Jan 2020 12:21:39 +0100 Subject: [PATCH] mobile: add TLS options to wallet unlocker listener The wallet unlocker service also requires the TLS certificates to be added, but this was not set. This commit sets the options similar to what is done for the regular RPC server. --- mobile/bindings.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mobile/bindings.go b/mobile/bindings.go index 0945a17b4..fed2b2185 100644 --- a/mobile/bindings.go +++ b/mobile/bindings.go @@ -74,6 +74,18 @@ func Start(extraArgs string, unlockerReady, rpcReady Callback) { // callbacks when the RPC servers are ready to accept calls. go func() { <-unlockerListening + + // We must set the TLS certificates in order to properly + // authenticate with the wallet unlocker service. + auth, err := lnd.WalletUnlockerAuthOptions() + if err != nil { + unlockerReady.OnError(err) + return + } + + // Add the auth options to the listener's dial options. + addWalletUnlockerLisDialOption(auth...) + unlockerReady.OnResponse([]byte{}) }()