mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-12-10 14:21:09 +01:00
Add test to ensure PGPainless will refuse to decrypt message with incapable key
This commit is contained in:
parent
80e12db8b6
commit
5108b81252
2 changed files with 204 additions and 2 deletions
|
|
@ -407,9 +407,9 @@ public final class DecryptionStreamFactory {
|
|||
|
||||
if (secretKey == null) {
|
||||
LOGGER.debug("Key " + Long.toHexString(keyId) + " is not valid or not capable for decryption.");
|
||||
} else {
|
||||
privateKey = tryPublicKeyDecryption(secretKeys, secretKey, publicKeyEncryptedData, postponedDueToMissingPassphrase, true);
|
||||
}
|
||||
|
||||
privateKey = tryPublicKeyDecryption(secretKeys, secretKey, publicKeyEncryptedData, postponedDueToMissingPassphrase, true);
|
||||
}
|
||||
if (privateKey == null) {
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue