From ec1700600a96e493dd0fac2a182dc191eaf227a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 30 May 2017 14:24:01 +0300 Subject: [PATCH] cmd/puppeth: fix improper key validation for remotes --- cmd/puppeth/module_node.go | 2 +- cmd/puppeth/wizard_node.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/puppeth/module_node.go b/cmd/puppeth/module_node.go index 6372f60d2f..ce1d341357 100644 --- a/cmd/puppeth/module_node.go +++ b/cmd/puppeth/module_node.go @@ -135,7 +135,7 @@ func deployNode(client *sshClient, network string, bootv4, bootv5 []string, conf } defer client.Run("rm -rf " + workdir) - // Build and deploy the bootnode service + // Build and deploy the boot or seal node service return nil, client.Stream(fmt.Sprintf("cd %s && docker-compose -p %s up -d --build", workdir, network)) } diff --git a/cmd/puppeth/wizard_node.go b/cmd/puppeth/wizard_node.go index 483d9fe056..05232486b6 100644 --- a/cmd/puppeth/wizard_node.go +++ b/cmd/puppeth/wizard_node.go @@ -109,8 +109,7 @@ func (w *wizard) deployNode(boot bool) { } else if w.conf.genesis.Config.Clique != nil { // If a previous signer was already set, offer to reuse it if infos.keyJSON != "" { - var key keystore.Key - if err := json.Unmarshal([]byte(infos.keyJSON), &key); err != nil { + if key, err := keystore.DecryptKey([]byte(infos.keyJSON), infos.keyPass); err != nil { infos.keyJSON, infos.keyPass = "", "" } else { fmt.Println()