mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-14 03:30:02 +00:00
trezorctl: Allow entering passphrase by environment variable PASSPHRASE.
This commit is contained in:
parent
5b3e992521
commit
ab42e93718
@ -278,6 +278,11 @@ class TextUIMixin(object):
|
||||
return proto.PinMatrixAck(pin=pin)
|
||||
|
||||
def callback_PassphraseRequest(self, msg):
|
||||
if os.getenv("PASSPHRASE") is not None:
|
||||
passphrase = Mnemonic.normalize_string(os.getenv("PASSPHRASE"))
|
||||
log("Passphrase required. Using '%s'" % passphrase)
|
||||
return proto.PassphraseAck(passphrase=passphrase)
|
||||
|
||||
log("Passphrase required: ")
|
||||
passphrase = getpass.getpass('')
|
||||
log("Confirm your Passphrase: ")
|
||||
|
Loading…
Reference in New Issue
Block a user