From 6fe80fb4b3e842f85c36dea08dbd7d0220f4c1e7 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sat, 25 May 2024 20:48:20 +0530 Subject: fix(pgpainless): remove incorrect check I don't believe this ever made sense to check in the decryption phase --- .../main/kotlin/app/passwordstore/crypto/PGPainlessCryptoHandler.kt | 5 ----- 1 file changed, 5 deletions(-) (limited to 'crypto') diff --git a/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPainlessCryptoHandler.kt b/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPainlessCryptoHandler.kt index 92fbfa64..1aabe54f 100644 --- a/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPainlessCryptoHandler.kt +++ b/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPainlessCryptoHandler.kt @@ -66,11 +66,6 @@ public class PGPainlessCryptoHandler @Inject constructor() : ) Streams.pipeAll(decryptionStream, outputStream) decryptionStream.close() - keyringCollection.forEach { keyRing -> - check(decryptionStream.metadata.isEncryptedFor(keyRing)) { - "Stream should be encrypted for ${keyRing.secretKey.keyID} but wasn't" - } - } return@runCatching } .mapError { error -> -- cgit v1.2.3