gpg: deduce curve name from existing pubkey information

This commit is contained in:
Roman Zeyde
2016-04-23 00:08:45 +03:00
parent fb368d24eb
commit 80f29469d0
2 changed files with 12 additions and 9 deletions

View File

@@ -21,9 +21,7 @@ def main():
else:
command, user_id = args
assert command == '-bsau' # --detach-sign --sign --armor --local-user
pubkey = signer.load_from_gpg(user_id)
s = signer.Signer(user_id=user_id, created=pubkey['created'])
assert s.key_id() == pubkey['key_id']
s = signer.load_from_gpg(user_id)
data = sys.stdin.read()
sig = s.sign(data)