1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-09-09 02:09:38 +02:00

IntegrityProtectedInputStream: remove useless logger

This commit is contained in:
Paul Schaub 2025-03-31 11:46:50 +02:00
parent e2832249cb
commit c7ce79a5af
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -9,8 +9,6 @@ import java.io.InputStream
import org.bouncycastle.openpgp.PGPEncryptedData
import org.bouncycastle.openpgp.PGPException
import org.pgpainless.exception.ModificationDetectionException
import org.slf4j.Logger
import org.slf4j.LoggerFactory
class IntegrityProtectedInputStream(
private val inputStream: InputStream,
@ -30,15 +28,9 @@ class IntegrityProtectedInputStream(
if (encryptedData.isIntegrityProtected && !options.isIgnoreMDCErrors()) {
try {
if (!encryptedData.verify()) throw ModificationDetectionException()
LOGGER.debug("Integrity Protection check passed.")
} catch (e: PGPException) {
throw IOException("Data appears to not be integrity protected.", e)
}
}
}
companion object {
@JvmStatic
val LOGGER: Logger = LoggerFactory.getLogger(IntegrityProtectedInputStream::class.java)
}
}