Move decompression into device.pubkey()

This commit is contained in:
Roman Zeyde
2020-09-24 13:51:00 +03:00
parent d0e7fa7cca
commit a12202d809
5 changed files with 15 additions and 14 deletions

View File

@@ -25,9 +25,7 @@ class Client:
def pubkey(self, identity, ecdh=False):
"""Return public key as VerifyingKey object."""
with self.device:
pubkey = self.device.pubkey(ecdh=ecdh, identity=identity)
return formats.decompress_pubkey(
pubkey=pubkey, curve_name=identity.curve_name)
return self.device.pubkey(ecdh=ecdh, identity=identity)
def sign(self, identity, digest):
"""Sign the digest and return a serialized signature."""