gpg: fix keygrip computation

This commit is contained in:
Roman Zeyde
2016-06-03 17:41:31 +03:00
parent e9f7894d62
commit 2acd0bf3b7

View File

@@ -80,7 +80,7 @@ def _serialize_ed25519(vk):
def _compute_keygrip(params):
parts = []
for name, value in params:
exp = '1:{}{}'.format(name, len(value))
exp = '1:{}{}:'.format(name, len(value))
parts.append(b'(' + exp.encode('ascii') + value + b')')
return hashlib.sha1(b''.join(parts)).digest()