1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-16 09:22:05 +01:00

OpenPgpMessageInputStream: Ignore non-integrity-protected data if configured

This commit is contained in:
Paul Schaub 2023-01-02 13:12:14 +01:00
parent 7be12b0aaa
commit 94d9efa1e7
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -409,9 +409,11 @@ public class OpenPgpMessageInputStream extends DecryptionStream {
PGPEncryptedDataList encDataList = packetInputStream.readEncryptedDataList(); PGPEncryptedDataList encDataList = packetInputStream.readEncryptedDataList();
if (!encDataList.isIntegrityProtected()) { if (!encDataList.isIntegrityProtected()) {
LOGGER.debug("Symmetrically Encrypted Data Packet is not integrity-protected and is therefore rejected."); LOGGER.warn("Symmetrically Encrypted Data Packet is not integrity-protected.");
if (!options.isIgnoreMDCErrors()) {
throw new MessageNotIntegrityProtectedException(); throw new MessageNotIntegrityProtectedException();
} }
}
SortedESKs esks = new SortedESKs(encDataList); SortedESKs esks = new SortedESKs(encDataList);
LOGGER.debug("Symmetrically Encrypted Integrity-Protected Data has " + LOGGER.debug("Symmetrically Encrypted Integrity-Protected Data has " +