Use BCs PGPEncryptedDataList.isIntegrityProtected()

This commit is contained in:
Paul Schaub 2022-11-03 12:52:20 +01:00
parent 6243d69061
commit f80b3e0cdb
1 changed files with 1 additions and 3 deletions

View File

@ -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();
}