device: allow loading identities from a file (instead of argument)

This commit is contained in:
Roman Zeyde
2016-11-03 20:19:24 +02:00
parent 47ff081525
commit 6f6e7c0bcc
4 changed files with 56 additions and 57 deletions

View File

@@ -11,15 +11,7 @@ class KeepKey(trezor.Trezor):
required_version = '>=1.0.4'
def connect(self):
"""No support for other than NIST256P elliptic curves."""
if self.curve_name not in {formats.CURVE_NIST256}:
fmt = 'KeepKey does not support {} curve'
raise interface.NotFoundError(fmt.format(self.curve_name))
return trezor.Trezor.connect(self)
def ecdh(self, pubkey):
def ecdh(self, identity, pubkey):
"""No support for ECDH in KeepKey firmware."""
msg = 'KeepKey does not support ECDH'
raise interface.NotFoundError(msg)