Added feature check

pull/1/head
slush0 9 years ago
parent 83e8655ece
commit bb4d21ba65

@ -337,6 +337,7 @@ class DebugLinkMixin(object):
class ProtocolMixin(object):
PRIME_DERIVATION_FLAG = 0x80000000
VENDORS = ('bitcointrezor.com',)
def __init__(self, *args, **kwargs):
super(ProtocolMixin, self).__init__(*args, **kwargs)
@ -348,6 +349,8 @@ class ProtocolMixin(object):
def init_device(self):
self.features = expect(proto.Features)(self.call)(proto.Initialize())
if str(self.features.vendor) not in self.VENDORS:
raise Exception("Unsupported device")
def _get_local_entropy(self):
return os.urandom(32)

Loading…
Cancel
Save