1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-16 11:28:14 +00:00

enable/disable passphrase protection via trezorctl

This commit is contained in:
Pavol Rusnak 2017-02-23 11:56:54 +01:00
parent 3e8122ba28
commit 127d76a913
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 13 additions and 1 deletions

View File

@ -11,7 +11,7 @@ else:
setup( setup(
name='trezor', name='trezor',
version='0.7.11', version='0.7.12',
author='TREZOR', author='TREZOR',
author_email='info@trezor.io', author_email='info@trezor.io',
description='Python library for communicating with TREZOR Hardware Wallet', description='Python library for communicating with TREZOR Hardware Wallet',

View File

@ -237,6 +237,12 @@ class Commands(object):
address_n = self.client.expand_path(args.n) address_n = self.client.expand_path(args.n)
return self.client.get_public_node(address_n, ecdsa_curve_name=args.curve, show_display=args.show_display) return self.client.get_public_node(address_n, ecdsa_curve_name=args.curve, show_display=args.show_display)
def enable_passphrase(self, args):
return self.client.apply_settings(use_passphrase=True)
def disable_passphrase(self, args):
return self.client.apply_settings(use_passphrase=False)
def set_label(self, args): def set_label(self, args):
return self.client.apply_settings(label=args.label) return self.client.apply_settings(label=args.label)
@ -381,6 +387,8 @@ class Commands(object):
get_entropy.help = 'Get example entropy' get_entropy.help = 'Get example entropy'
get_features.help = 'Retrieve device features and settings' get_features.help = 'Retrieve device features and settings'
get_public_node.help = 'Get public node of given path' get_public_node.help = 'Get public node of given path'
enable_passphrase.help = 'Enable passphrase'
disable_passphrase.help = 'Disable passphrase'
set_label.help = 'Set new wallet label' set_label.help = 'Set new wallet label'
set_homescreen.help = 'Set new homescreen' set_homescreen.help = 'Set new homescreen'
clear_session.help = 'Clear session (remove cached PIN, passphrase, etc.)' clear_session.help = 'Clear session (remove cached PIN, passphrase, etc.)'
@ -441,6 +449,10 @@ class Commands(object):
(('-r', '--passphrase-protection'), {'action': 'store_true', 'default': False}), (('-r', '--passphrase-protection'), {'action': 'store_true', 'default': False}),
) )
enable_passphrase.arguments = ()
disable_passphrase.arguments = ()
set_label.arguments = ( set_label.arguments = (
(('-l', '--label',), {'type': str, 'default': ''}), (('-l', '--label',), {'type': str, 'default': ''}),
# (('-c', '--clear'), {'action': 'store_true', 'default': False}) # (('-c', '--clear'), {'action': 'store_true', 'default': False})