diff --git a/pgpainless-sop/src/test/java/org/pgpainless/sop/EncryptDecryptRoundTripTest.java b/pgpainless-sop/src/test/java/org/pgpainless/sop/EncryptDecryptRoundTripTest.java index 30305edd..ccfeaf41 100644 --- a/pgpainless-sop/src/test/java/org/pgpainless/sop/EncryptDecryptRoundTripTest.java +++ b/pgpainless-sop/src/test/java/org/pgpainless/sop/EncryptDecryptRoundTripTest.java @@ -556,14 +556,25 @@ public class EncryptDecryptRoundTripTest { @Test public void encryptWithSupportedProfileTest() throws IOException { + + byte[] key = sop.generateKey() + .profile("rfc4880") + .userId("Alice ") + .generate() + .getBytes(); + + byte[] cert = sop.extractCert() + .key(key) + .getBytes(); + byte[] encrypted = sop.encrypt() .profile("rfc4880") - .withCert(bobCert) + .withCert(cert) .plaintext(message) .getBytes(); ByteArrayAndResult bytesAndResult = sop.decrypt() - .withKey(bobKey) + .withKey(key) .ciphertext(encrypted) .toByteArrayAndResult();