mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-23 04:42:06 +01:00
Fix AssertionError when determining encryption subkeys from set containing unbound key
This commit is contained in:
parent
5ea8294a60
commit
aef213a672
1 changed files with 4 additions and 3 deletions
|
@ -748,12 +748,13 @@ public class KeyRingInfo {
|
||||||
List<PGPPublicKey> encryptionKeys = new ArrayList<>();
|
List<PGPPublicKey> encryptionKeys = new ArrayList<>();
|
||||||
while (subkeys.hasNext()) {
|
while (subkeys.hasNext()) {
|
||||||
PGPPublicKey subKey = subkeys.next();
|
PGPPublicKey subKey = subkeys.next();
|
||||||
Date subkeyExpiration = getSubkeyExpirationDate(new OpenPgpV4Fingerprint(subKey));
|
|
||||||
if (subkeyExpiration != null && subkeyExpiration.before(new Date())) {
|
if (!isKeyValidlyBound(subKey.getKeyID())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isKeyValidlyBound(subKey.getKeyID())) {
|
Date subkeyExpiration = getSubkeyExpirationDate(new OpenPgpV4Fingerprint(subKey));
|
||||||
|
if (subkeyExpiration != null && subkeyExpiration.before(new Date())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue