diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-04-03 18:22:55 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-04-03 18:32:03 +0200 |
commit | a9ca727cab50c0c91098a7ef8aea79f5f62a1f5c (patch) | |
tree | e7122be749e5b3b26ee96969f4f9e8347fe6532b /ipc/tests | |
parent | 6494b37775ada713e8ff139ee40c5accdfcaf16a (diff) |
openpgp: Unawkwardify the streaming encryptor.
Diffstat (limited to 'ipc/tests')
-rw-r--r-- | ipc/tests/gpg-agent.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ipc/tests/gpg-agent.rs b/ipc/tests/gpg-agent.rs index 45c532e6..5af03024 100644 --- a/ipc/tests/gpg-agent.rs +++ b/ipc/tests/gpg-agent.rs @@ -207,18 +207,19 @@ fn decrypt() { let mut message = Vec::new(); { - let recipient = + let recipients = cert.keys().with_policy(p, None).alive().revoked(false) .for_transport_encryption() .map(|ka| ka.key().into()) - .nth(0).unwrap(); + .collect(); // Start streaming an OpenPGP message. let message = Message::new(&mut message); // We want to encrypt a literal data packet. let encryptor = - Encryptor::for_recipient(message, recipient).build().unwrap(); + Encryptor::for_recipients(message, recipients) + .build().unwrap(); // Emit a literal data packet. let mut literal_writer = LiteralWriter::new( |