From bbbc6da375d6584c7b2bcc74e838fff943f489d4 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Thu, 28 Nov 2019 15:27:33 +0100 Subject: Call TPKs Certificates, update identifiers, documentation. - Fixes #387. --- ipc/examples/gpg-agent-sign.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ipc/examples/gpg-agent-sign.rs') diff --git a/ipc/examples/gpg-agent-sign.rs b/ipc/examples/gpg-agent-sign.rs index 923657bd..f6b4d1ff 100644 --- a/ipc/examples/gpg-agent-sign.rs +++ b/ipc/examples/gpg-agent-sign.rs @@ -18,7 +18,7 @@ fn main() { .arg(clap::Arg::with_name("homedir").value_name("PATH") .long("homedir") .help("Use this GnuPG home directory, default: $GNUPGHOME")) - .arg(clap::Arg::with_name("tpk").value_name("TPK") + .arg(clap::Arg::with_name("cert").value_name("Cert") .required(true) .multiple(true) .help("Public part of the secret keys managed by gpg-agent")) @@ -30,16 +30,16 @@ fn main() { Context::new().unwrap() }; - // Read the TPKs from the given files. - let tpks = - matches.values_of("tpk").expect("required").map(|f| { - openpgp::TPK::from_file(f) + // Read the Certs from the given files. + let certs = + matches.values_of("cert").expect("required").map(|f| { + openpgp::Cert::from_file(f) .expect("Failed to read key") }).collect::>(); // Construct a KeyPair for every signing-capable (sub)key. - let mut signers = tpks.iter().flat_map(|tpk| { - tpk.keys_valid().signing_capable().filter_map(|(_, _, key)| { + let mut signers = certs.iter().flat_map(|cert| { + cert.keys_valid().signing_capable().filter_map(|(_, _, key)| { KeyPair::new(&ctx, key).ok() }) }).collect::>>(); -- cgit v1.2.3