summaryrefslogtreecommitdiffstats
path: root/tool/src/commands/mod.rs
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2019-12-19 21:47:19 +0100
committerNeal H. Walfield <neal@pep.foundation>2019-12-19 21:51:19 +0100
commitb3ba97146f534ac5cf67db7f72d8a633112d0a18 (patch)
tree581c64936f0a857dd1f0fbf75c7a4ddf243d8656 /tool/src/commands/mod.rs
parent2b2b5c8905d0e823d03b5ba2a115298e80e08b74 (diff)
openpgp: Change KeyIter to return a struct instead of a tuple.
- A tuple is just an unnamed, inflexible struct. Use a struct instead. - Fixes #400.
Diffstat (limited to 'tool/src/commands/mod.rs')
-rw-r--r--tool/src/commands/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tool/src/commands/mod.rs b/tool/src/commands/mod.rs
index 3ecd65ca..1263fa05 100644
--- a/tool/src/commands/mod.rs
+++ b/tool/src/commands/mod.rs
@@ -50,7 +50,7 @@ fn get_signing_keys(certs: &[openpgp::Cert])
'next_cert: for tsk in certs {
for key in tsk.keys_valid()
.for_signing()
- .map(|k| k.2)
+ .map(|ka| ka.key())
{
if let Some(secret) = key.secret() {
let unencrypted = match secret {
@@ -112,7 +112,7 @@ pub fn encrypt(mapping: &mut store::Mapping,
let mut recipient_subkeys: Vec<Recipient> = Vec::new();
for cert in certs.iter() {
let mut count = 0;
- for (_, _, key) in cert.keys_valid().key_flags(mode.clone()) {
+ for key in cert.keys_valid().key_flags(mode.clone()).map(|ka| ka.key()) {
recipient_subkeys.push(key.into());
count += 1;
}
@@ -306,7 +306,7 @@ impl<'a> VerificationHelper for VHelper<'a> {
.flat_map(|cert| {
// Even if a key is revoked or expired, we can still
// use it to verify a message.
- cert.keys_all().map(|(_, _, key)| key.fingerprint().into())
+ cert.keys_all().map(|ka| ka.key().fingerprint().into())
}).collect();
// Explicitly provided keys are trusted.