From f80b3e0cdb4d2ef6b5cb34229a9af06d44532960 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Thu, 3 Nov 2022 12:52:20 +0100 Subject: [PATCH] Use BCs PGPEncryptedDataList.isIntegrityProtected() --- .../decryption_verification/OpenPgpMessageInputStream.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/OpenPgpMessageInputStream.java b/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/OpenPgpMessageInputStream.java index f2c30ced..83c0a3f2 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/OpenPgpMessageInputStream.java +++ b/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/OpenPgpMessageInputStream.java @@ -405,9 +405,7 @@ public class OpenPgpMessageInputStream extends DecryptionStream { syntaxVerifier.next(InputSymbol.EncryptedData); PGPEncryptedDataList encDataList = packetInputStream.readEncryptedDataList(); - // TODO: Replace with !encDataList.isIntegrityProtected() - // once BC ships it - if (!encDataList.get(0).isIntegrityProtected()) { + if (!encDataList.isIntegrityProtected()) { LOGGER.debug("Symmetrically Encrypted Data Packet is not integrity-protected and is therefore rejected."); throw new MessageNotIntegrityProtectedException(); }