mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-22 12:22:06 +01:00
getEncryptionSubkeys(): Compare expirations against reference date
This commit is contained in:
parent
ed2c53f5d6
commit
acb5d3fd9e
1 changed files with 2 additions and 2 deletions
|
@ -903,7 +903,7 @@ public class KeyRingInfo {
|
|||
*/
|
||||
public @Nonnull List<PGPPublicKey> getEncryptionSubkeys(EncryptionPurpose purpose) {
|
||||
Date primaryExpiration = getPrimaryKeyExpirationDate();
|
||||
if (primaryExpiration != null && primaryExpiration.before(new Date())) {
|
||||
if (primaryExpiration != null && primaryExpiration.before(referenceDate)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
|
@ -917,7 +917,7 @@ public class KeyRingInfo {
|
|||
}
|
||||
|
||||
Date subkeyExpiration = getSubkeyExpirationDate(OpenPgpFingerprint.of(subKey));
|
||||
if (subkeyExpiration != null && subkeyExpiration.before(new Date())) {
|
||||
if (subkeyExpiration != null && subkeyExpiration.before(referenceDate)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue