summaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-12-03 17:50:12 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-12-04 13:21:47 +0100
commit8354d849b19170a9a2c2b97179d9aaedb6fca6cf (patch)
tree12578d07af9c4d104571e1055e1d40af4eae99ed /tool
parent807eee2432de52715a2e3c7167d5e859ca3315a8 (diff)
openpgp: Rename KeyFlag's accessors.
- Fixes #359.
Diffstat (limited to 'tool')
-rw-r--r--tool/src/commands/decrypt.rs4
-rw-r--r--tool/src/commands/inspect.rs10
-rw-r--r--tool/src/commands/key.rs4
-rw-r--r--tool/src/sq.rs8
4 files changed, 13 insertions, 13 deletions
diff --git a/tool/src/commands/decrypt.rs b/tool/src/commands/decrypt.rs
index 775ab386..f872a84f 100644
--- a/tool/src/commands/decrypt.rs
+++ b/tool/src/commands/decrypt.rs
@@ -45,8 +45,8 @@ impl<'a> Helper<'a> {
R: key::KeyRole,
{
if let Some(sig) = sig {
- sig.key_flags().can_encrypt_at_rest()
- || sig.key_flags().can_encrypt_for_transport()
+ sig.key_flags().for_storage_encryption()
+ || sig.key_flags().for_transport_encryption()
} else {
false
}
diff --git a/tool/src/commands/inspect.rs b/tool/src/commands/inspect.rs
index 87b2bc2d..42d30530 100644
--- a/tool/src/commands/inspect.rs
+++ b/tool/src/commands/inspect.rs
@@ -232,19 +232,19 @@ fn inspect_revocation(output: &mut dyn io::Write,
fn inspect_key_flags(flags: openpgp::types::KeyFlags) -> Option<String> {
let mut capabilities = Vec::new();
- if flags.can_certify() {
+ if flags.for_certification() {
capabilities.push("certification")
}
- if flags.can_sign() {
+ if flags.for_signing() {
capabilities.push("signing")
}
- if flags.can_authenticate() {
+ if flags.for_authentication() {
capabilities.push("authentication")
}
- if flags.can_encrypt_for_transport() {
+ if flags.for_transport_encryption() {
capabilities.push("transport encryption")
}
- if flags.can_encrypt_at_rest() {
+ if flags.for_storage_encryption() {
capabilities.push("data-at-rest encryption")
}
diff --git a/tool/src/commands/key.rs b/tool/src/commands/key.rs
index 8617cc9f..2c081f65 100644
--- a/tool/src/commands/key.rs
+++ b/tool/src/commands/key.rs
@@ -150,12 +150,12 @@ pub fn generate(m: &ArgMatches, force: bool) -> failure::Fallible<()> {
}
(Some("rest"), false) => {
builder = builder.add_subkey(KeyFlags::default()
- .set_encrypt_at_rest(true),
+ .set_storage_encryption(true),
None);
}
(Some("transport"), false) => {
builder = builder.add_subkey(KeyFlags::default()
- .set_encrypt_for_transport(true),
+ .set_transport_encryption(true),
None);
}
(None, true) => { /* no encryption subkey */ }
diff --git a/tool/src/sq.rs b/tool/src/sq.rs
index c928a325..055cf642 100644
--- a/tool/src/sq.rs
+++ b/tool/src/sq.rs
@@ -210,12 +210,12 @@ fn real_main() -> Result<(), failure::Error> {
.unwrap_or(Ok(vec![]))?;
let mode = match m.value_of("mode").expect("has default") {
"rest" => KeyFlags::default()
- .set_encrypt_at_rest(true),
+ .set_storage_encryption(true),
"transport" => KeyFlags::default()
- .set_encrypt_for_transport(true),
+ .set_transport_encryption(true),
"all" => KeyFlags::default()
- .set_encrypt_at_rest(true)
- .set_encrypt_for_transport(true),
+ .set_storage_encryption(true)
+ .set_transport_encryption(true),
_ => unreachable!("uses possible_values"),
};
commands::encrypt(&mut mapping, &mut input, &mut output,