mirror of
https://github.com/romanz/amodem.git
synced 2026-04-20 04:56:25 +08:00
gpg: check keygrip on ECDH
This commit is contained in:
@@ -88,7 +88,7 @@ def pkdecrypt(keygrip, conn):
|
|||||||
f = encode.Factory.from_public_key(
|
f = encode.Factory.from_public_key(
|
||||||
pubkey=local_pubkey, user_id=local_pubkey['user_id'])
|
pubkey=local_pubkey, user_id=local_pubkey['user_id'])
|
||||||
with contextlib.closing(f):
|
with contextlib.closing(f):
|
||||||
### assert f.pubkey.keygrip == binascii.unhexlify(keygrip)
|
assert f.pubkey.keygrip == binascii.unhexlify(keygrip)
|
||||||
shared_secret = f.get_shared_secret(remote_pubkey)
|
shared_secret = f.get_shared_secret(remote_pubkey)
|
||||||
|
|
||||||
assert len(shared_secret) == 65
|
assert len(shared_secret) == 65
|
||||||
|
|||||||
Reference in New Issue
Block a user