mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-30 00:02:06 +01:00
Fix decrypt no signatures test
This commit is contained in:
parent
bca359805b
commit
07f9c3ceef
1 changed files with 6 additions and 4 deletions
|
@ -166,18 +166,20 @@ public class EncryptDecryptRoundTripTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void encrypt_decryptAndVerifyYieldsNoSignatureException() throws IOException {
|
public void encrypt_decryptAndVerifyYieldsNoVerifications() throws IOException {
|
||||||
byte[] encrypted = sop.encrypt()
|
byte[] encrypted = sop.encrypt()
|
||||||
.withCert(bobCert)
|
.withCert(bobCert)
|
||||||
.plaintext(message)
|
.plaintext(message)
|
||||||
.getBytes();
|
.getBytes();
|
||||||
|
|
||||||
assertThrows(SOPGPException.NoSignature.class, () -> sop
|
DecryptionResult result = sop.decrypt()
|
||||||
.decrypt()
|
|
||||||
.withKey(bobKey)
|
.withKey(bobKey)
|
||||||
.verifyWithCert(aliceCert)
|
.verifyWithCert(aliceCert)
|
||||||
.ciphertext(encrypted)
|
.ciphertext(encrypted)
|
||||||
.toByteArrayAndResult());
|
.toByteArrayAndResult()
|
||||||
|
.getResult();
|
||||||
|
|
||||||
|
assertTrue(result.getVerifications().isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in a new issue