diff options
author | Wiktor Kwapisiewicz <wiktor@metacode.biz> | 2020-09-17 10:19:55 +0200 |
---|---|---|
committer | Wiktor Kwapisiewicz <wiktor@metacode.biz> | 2020-09-22 09:32:09 +0200 |
commit | 499372f18785a884dc819c03fa5d24ecd229211f (patch) | |
tree | 33b4ac0d0d196244bbc8a681029a8da9358f1ed8 /sop/src | |
parent | 6c12cbcf9d1396ec8028ea3f17430e3d20c3c89f (diff) |
openpgp: Hide stream::Encryptor::aead_algo from public API.
- Mark `aead_algo` as available only during tests,
- Remove support for AEAD from `sop`,
- Mark `aead` parameter in FFI as unused,
- openpgp-ffi: Drop `aead_algo` argument from `pgp_encryptor_new`,
- Fixes #550.
Diffstat (limited to 'sop/src')
-rw-r--r-- | sop/src/main.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sop/src/main.rs b/sop/src/main.rs index 15eccf4c..37f28d06 100644 --- a/sop/src/main.rs +++ b/sop/src/main.rs @@ -300,14 +300,12 @@ fn real_main() -> Result<()> { let message = stdout(no_armor, armor::Kind::Message)?; // Encrypt the message. - let mut encryptor = + let encryptor = Encryptor::for_recipients(message, recipients) .add_passwords(passwords) .symmetric_algo( symmetric_algos.get(0).cloned().unwrap_or_default()); - if let Some(&a) = aead_algos.get(0) { - encryptor = encryptor.aead_algo(a); - } + let message = encryptor.build() .context("Failed to create encryptor")?; |