From 2902c81b6cd8eb56042833d3125b401eaf1bfa49 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Fri, 10 Jan 2020 18:31:27 +0100 Subject: [PATCH] Simplify integrity protection assignment of resultBuilder --- .../decryption_verification/DecryptionStreamFactory.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/DecryptionStreamFactory.java b/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/DecryptionStreamFactory.java index f91643d1..da5a2f0a 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/DecryptionStreamFactory.java +++ b/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/DecryptionStreamFactory.java @@ -191,13 +191,7 @@ public final class DecryptionStreamFactory { LOGGER.log(LEVEL, "Message is encrypted using " + symmetricKeyAlgorithm); resultBuilder.setSymmetricKeyAlgorithm(symmetricKeyAlgorithm); - if (encryptedSessionKey.isIntegrityProtected()) { - LOGGER.log(LEVEL, "Message is integrity protected"); - resultBuilder.setIntegrityProtected(true); - } else { - LOGGER.log(LEVEL, "Message is not integrity protected"); - resultBuilder.setIntegrityProtected(false); - } + resultBuilder.setIntegrityProtected(encryptedSessionKey.isIntegrityProtected()); return encryptedSessionKey.getDataStream(keyDecryptor); }