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

Simplify integrity protection assignment of resultBuilder

This commit is contained in:
Paul Schaub 2020-01-10 18:31:27 +01:00
parent dd976b7319
commit 2902c81b6c
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

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