summaryrefslogtreecommitdiffstats
path: root/ipc/examples/gpg-agent-sign.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-11-28 15:27:33 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-11-28 16:26:43 +0100
commitbbbc6da375d6584c7b2bcc74e838fff943f489d4 (patch)
tree0a965698c96dbc0fc8541c6adc2224935b68bc07 /ipc/examples/gpg-agent-sign.rs
parentf53c77752ff04c3713c175a76a06723042e681ae (diff)
Call TPKs Certificates, update identifiers, documentation.
- Fixes #387.
Diffstat (limited to 'ipc/examples/gpg-agent-sign.rs')
-rw-r--r--ipc/examples/gpg-agent-sign.rs14
1 files changed, 7 insertions, 7 deletions
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::<Vec<_>>();
// 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::<Vec<KeyPair<_>>>();