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

Add test for anonymous recipients

This commit is contained in:
Paul Schaub 2023-06-15 14:28:56 +02:00
parent e9cd6c55cf
commit 6b145475a8
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 74 additions and 0 deletions

View file

@ -649,6 +649,9 @@ public class OpenPgpMessageInputStream extends DecryptionStream {
for (PGPPublicKeyEncryptedData pkesk : esks.pkesks) {
encryptedData.recipients.add(pkesk.getKeyID());
}
for (PGPPublicKeyEncryptedData pkesk : esks.anonPkesks) {
encryptedData.recipients.add(pkesk.getKeyID());
}
LOGGER.debug("Successfully decrypted data with key " + decryptionKeyId);
IntegrityProtectedInputStream integrityProtected = new IntegrityProtectedInputStream(decrypted, asymEsk, options);