diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-02-06 14:49:01 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-02-06 15:06:09 +0100 |
commit | d6ed2a3cbb18c50c2da73d5efbdade343e3bad12 (patch) | |
tree | 15cefd9945499ab20065acb30df86d3ccd829cca /tool/src/commands | |
parent | 23110e2844a19ffdd1d5c1699cb868f93f734ccc (diff) |
openpgp: Rename methods 'set_policy' to 'with_policy'.
- Fixes #427.
Diffstat (limited to 'tool/src/commands')
-rw-r--r-- | tool/src/commands/decrypt.rs | 2 | ||||
-rw-r--r-- | tool/src/commands/inspect.rs | 4 | ||||
-rw-r--r-- | tool/src/commands/mod.rs | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tool/src/commands/decrypt.rs b/tool/src/commands/decrypt.rs index c1a35dd6..ba71689e 100644 --- a/tool/src/commands/decrypt.rs +++ b/tool/src/commands/decrypt.rs @@ -55,7 +55,7 @@ impl<'a> Helper<'a> { for ka in tsk.keys() // XXX: Should use the message's creation time that we do not know. - .set_policy(policy, None) + .with_policy(policy, None) .for_transport_encryption().for_storage_encryption() .secret() { diff --git a/tool/src/commands/inspect.rs b/tool/src/commands/inspect.rs index a70524e5..53bf80e8 100644 --- a/tool/src/commands/inspect.rs +++ b/tool/src/commands/inspect.rs @@ -142,7 +142,7 @@ fn inspect_cert(policy: &dyn Policy, print_keygrips, print_certifications)?; writeln!(output)?; - for vka in cert.keys().skip_primary().set_policy(policy, None) { + for vka in cert.keys().skip_primary().with_policy(policy, None) { writeln!(output, " Subkey: {}", vka.key().fingerprint())?; inspect_revocation(output, "", vka.revoked())?; inspect_key(policy, output, "", vka.into(), @@ -214,7 +214,7 @@ fn inspect_key(policy: &dyn Policy, { let key = ka.key(); let binding = ka.bundle(); - let vka = match ka.set_policy(policy, None) { + let vka = match ka.with_policy(policy, None) { Ok(vka) => { if let Err(e) = vka.alive() { writeln!(output, "{} Invalid: {}", indent, e)?; diff --git a/tool/src/commands/mod.rs b/tool/src/commands/mod.rs index f4abe71f..d6c6f2b5 100644 --- a/tool/src/commands/mod.rs +++ b/tool/src/commands/mod.rs @@ -51,7 +51,7 @@ fn get_signing_keys(certs: &[openpgp::Cert], p: &dyn Policy, { let mut keys = Vec::new(); 'next_cert: for tsk in certs { - for key in tsk.keys().set_policy(p, timestamp).alive().revoked(false) + for key in tsk.keys().with_policy(p, timestamp).alive().revoked(false) .for_signing() .map(|ka| ka.key()) { @@ -116,7 +116,7 @@ pub fn encrypt(policy: &dyn Policy, let mut recipient_subkeys: Vec<Recipient> = Vec::new(); for cert in certs.iter() { let mut count = 0; - for key in cert.keys().set_policy(policy, None).alive().revoked(false) + for key in cert.keys().with_policy(policy, None).alive().revoked(false) .key_flags(&mode).map(|ka| ka.key()) { recipient_subkeys.push(key.into()); |