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

Encrypt to all capable subkeys by default

This commit is contained in:
Paul Schaub 2021-08-04 16:38:17 +02:00
parent 7490eb925f
commit 9a485a3354
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 20 additions and 3 deletions

View file

@ -179,14 +179,14 @@ public class EncryptionOptionsTest {
Arrays.asList(publicKeys, secondKeyRing));
EncryptionOptions options = new EncryptionOptions();
options.addRecipients(collection);
options.addRecipients(collection, EncryptionOptions.encryptToFirstSubkey());
assertEquals(2, options.getEncryptionKeyIdentifiers().size());
}
@Test
public void testAddRecipient_withValidUserId() {
EncryptionOptions options = new EncryptionOptions();
options.addRecipient(publicKeys, "test@pgpainless.org");
options.addRecipient(publicKeys, "test@pgpainless.org", EncryptionOptions.encryptToFirstSubkey());
assertEquals(1, options.getEncryptionMethods().size());
}