[#1103] neofs-cli: disallow generating key for control commands

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-01-26 10:53:30 +03:00 committed by LeL
parent 007158ebe1
commit 5c2b2e137d
2 changed files with 9 additions and 7 deletions

View file

@ -174,7 +174,10 @@ func getKey() (*ecdsa.PrivateKey, error) {
}
return &priv.PrivateKey, nil
}
return getKeyNoGenerate()
}
func getKeyNoGenerate() (*ecdsa.PrivateKey, error) {
// Ideally we want to touch file-system on the last step.
// However, asking for NEP-2 password seems to be confusing if we provide a wallet.
// Thus we try keys in the following order: