ecdh: fixup pubkey ID
This commit is contained in:
@@ -98,11 +98,13 @@ class Factory(object):
|
||||
@classmethod
|
||||
def from_public_key(cls, pubkey, user_id):
|
||||
"""Create from an existing GPG public key."""
|
||||
s = cls(user_id=user_id,
|
||||
is_ecdh = (pubkey['algo'] == proto.ECDH_ALGO_ID)
|
||||
f = cls(user_id=user_id,
|
||||
created=pubkey['created'],
|
||||
curve_name=proto.find_curve_by_algo_id(pubkey['algo']))
|
||||
### assert s.pubkey.key_id() == pubkey['key_id']
|
||||
return s
|
||||
curve_name=proto.find_curve_by_algo_id(pubkey['algo']),
|
||||
ecdh=is_ecdh)
|
||||
assert f.pubkey.key_id() == pubkey['key_id']
|
||||
return f
|
||||
|
||||
def close(self):
|
||||
"""Close connection and turn off the screen of the device."""
|
||||
|
||||
Reference in New Issue
Block a user