1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-12-10 06:11:08 +01:00

Fix decryption of messages with Wildcard recipient

Fixes #76
This commit is contained in:
Paul Schaub 2021-02-17 20:20:10 +01:00
parent 506a8b18af
commit d2a581de9b
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 130 additions and 30 deletions

View file

@ -33,7 +33,6 @@ import org.bouncycastle.openpgp.PGPCompressedData;
import org.bouncycastle.openpgp.PGPEncryptedData;
import org.bouncycastle.openpgp.PGPEncryptedDataList;
import org.bouncycastle.openpgp.PGPException;
import org.bouncycastle.openpgp.PGPKeyValidationException;
import org.bouncycastle.openpgp.PGPLiteralData;
import org.bouncycastle.openpgp.PGPObjectFactory;
import org.bouncycastle.openpgp.PGPOnePassSignature;
@ -240,7 +239,7 @@ public final class DecryptionStreamFactory {
resultBuilder.setDecryptionFingerprint(new OpenPgpV4Fingerprint(key));
encryptedSessionKey = publicKeyEncryptedData;
break outerloop;
} catch (ClassCastException | PGPKeyValidationException e) {
} catch (PGPException | ClassCastException e) {
LOGGER.log(LEVEL, "Skipping wrong key " + Long.toHexString(key.getKeyID()) + " for hidden recipient decryption.", e);
}
}