verify the signature on a block of text.
'key_cannot_encrypt' is set to True if pubkeys or sigs' keys in the payload
- piece are not capable of encryption. This could happen if a key is revoked
- or expired, for instance.
+ piece are not capable of encryption, are revoked or expired, for instance.
'keys' is a list of fingerprints of keys obtained in public key blocks.
"""
except gpgme.GpgmeError:
continue
- if encrypt_to_key.can_encrypt == True:
+ if encrypt_to_key.can_encrypt == True and encrypt_to_key.revoked == False:
replyinfo_obj.encrypt_to_key = encrypt_to_key
replyinfo_obj.have_reply_key = True
replyinfo_obj.key_can_encrypt = True
except:
pass
- if key_obj.can_encrypt == True:
+ if key_obj.can_encrypt == True and key_obj.revoked == False:
key_fingerprints += [fingerprint]
key_cannot_encrypt = False
sigkey_missing = True
continue
- if key_obj.can_encrypt == True:
+ if key_obj.can_encrypt == True and key_obj.revoked == False:
fingerprints += [sig.fpr]
key_cannot_encrypt = False
sigkey_missing = False