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 /tool/src/commands/key.rs | |
parent | 98253e6dbeffdff0e74ed4258fbc7a3fe38232a0 (diff) |
openpgp: Refine CertBuilder::add_encryption_subkey.
Diffstat (limited to 'tool/src/commands/key.rs')
-rw-r--r-- | tool/src/commands/key.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tool/src/commands/key.rs b/tool/src/commands/key.rs index 2c081f65..259f08ab 100644 --- a/tool/src/commands/key.rs +++ b/tool/src/commands/key.rs @@ -146,17 +146,16 @@ pub fn generate(m: &ArgMatches, force: bool) -> failure::Fallible<()> { // Encryption Capability match (m.value_of("can-encrypt"), m.is_present("cannot-encrypt")) { (Some("all"), false) | (None, false) => { - builder = builder.add_encryption_subkey(); - } - (Some("rest"), false) => { builder = builder.add_subkey(KeyFlags::default() + .set_transport_encryption(true) .set_storage_encryption(true), None); } + (Some("rest"), false) => { + builder = builder.add_storage_encryption_subkey(); + } (Some("transport"), false) => { - builder = builder.add_subkey(KeyFlags::default() - .set_transport_encryption(true), - None); + builder = builder.add_transport_encryption_subkey(); } (None, true) => { /* no encryption subkey */ } (Some(_), true) => { |