mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-26 22:32:07 +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) {
|
public @Nonnull List<PGPPublicKey> getEncryptionSubkeys(EncryptionPurpose purpose) {
|
||||||
Date primaryExpiration = getPrimaryKeyExpirationDate();
|
Date primaryExpiration = getPrimaryKeyExpirationDate();
|
||||||
if (primaryExpiration != null && primaryExpiration.before(new Date())) {
|
if (primaryExpiration != null && primaryExpiration.before(referenceDate)) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -917,7 +917,7 @@ public class KeyRingInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
Date subkeyExpiration = getSubkeyExpirationDate(OpenPgpFingerprint.of(subKey));
|
Date subkeyExpiration = getSubkeyExpirationDate(OpenPgpFingerprint.of(subKey));
|
||||||
if (subkeyExpiration != null && subkeyExpiration.before(new Date())) {
|
if (subkeyExpiration != null && subkeyExpiration.before(referenceDate)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue