mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2025-03-30 15:08:32 +00:00
Merge pull request #494 from openpgpjs/invalidate_expired_primary_keys
Invalidate expired primary keys
This commit is contained in:
commit
a6b81b127b
@ -358,7 +358,7 @@ Key.prototype.getEncryptionKeyPacket = function() {
|
||||
}
|
||||
// if no valid subkey for encryption, evaluate primary key
|
||||
var primaryUser = this.getPrimaryUser();
|
||||
if (primaryUser &&
|
||||
if (primaryUser && primaryUser.selfCertificate && !primaryUser.selfCertificate.isExpired &&
|
||||
isValidEncryptionKeyPacket(this.primaryKey, primaryUser.selfCertificate)) {
|
||||
return this.primaryKey;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user