1
0
Fork 0
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:
Paul Schaub 2021-10-14 15:53:49 +02:00
parent 5ea8294a60
commit aef213a672
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -748,12 +748,13 @@ public class KeyRingInfo {
List<PGPPublicKey> encryptionKeys = new ArrayList<>();
while (subkeys.hasNext()) {
PGPPublicKey subKey = subkeys.next();
Date subkeyExpiration = getSubkeyExpirationDate(new OpenPgpV4Fingerprint(subKey));
if (subkeyExpiration != null && subkeyExpiration.before(new Date())) {
if (!isKeyValidlyBound(subKey.getKeyID())) {
continue;
}
if (!isKeyValidlyBound(subKey.getKeyID())) {
Date subkeyExpiration = getSubkeyExpirationDate(new OpenPgpV4Fingerprint(subKey));
if (subkeyExpiration != null && subkeyExpiration.before(new Date())) {
continue;
}