diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-12-04 13:07:24 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-12-04 13:21:47 +0100 |
commit | 43f4017c820c9b67c9e08f860182ab5c7126fc68 (patch) | |
tree | 0f6fc3ad9fceca65988212fea94f816928d8c74f /openpgp/examples | |
parent | 98253e6dbeffdff0e74ed4258fbc7a3fe38232a0 (diff) |
openpgp: Refine CertBuilder::add_encryption_subkey.
Diffstat (limited to 'openpgp/examples')
-rw-r--r-- | openpgp/examples/generate-encrypt-decrypt.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/openpgp/examples/generate-encrypt-decrypt.rs b/openpgp/examples/generate-encrypt-decrypt.rs index 5baef893..55ea89d6 100644 --- a/openpgp/examples/generate-encrypt-decrypt.rs +++ b/openpgp/examples/generate-encrypt-decrypt.rs @@ -29,7 +29,7 @@ fn main() { fn generate() -> openpgp::Result<openpgp::Cert> { let (cert, _revocation) = openpgp::cert::CertBuilder::new() .add_userid("someone@example.org") - .add_encryption_subkey() + .add_transport_encryption_subkey() .generate()?; // Save the revocation certificate somewhere. @@ -43,7 +43,6 @@ fn encrypt(sink: &mut dyn Write, plaintext: &str, recipient: &openpgp::Cert) // Build a vector of recipients to hand to Encryptor. let mut recipients = recipient.keys_valid() - .for_storage_encryption() .for_transport_encryption() .map(|(_, _, key)| key.into()) .collect::<Vec<_>>(); |