handle some errors when verifying gpg keys

This commit is contained in:
Yann Leboulanger 2010-11-30 11:10:37 +01:00
parent b5eebddeb3
commit b58248ac25
1 changed files with 9 additions and 0 deletions

View File

@ -677,6 +677,15 @@ class Verify(object):
elif key == "SIG_ID":
(self.signature_id,
self.creation_date, self.timestamp) = value.split()
elif key == "ERRSIG":
self.valid = False
(self.key_id,
algo, hash_algo,
cls,
self.timestamp) = value.split()[:5]
elif key == "NO_PUBKEY":
self.valid = False
self.key_id = value
else:
raise ValueError("Unknown status message: %r" % key)