summaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-01-22 11:39:11 +0100
committerJustus Winter <justus@sequoia-pgp.org>2020-01-22 11:39:11 +0100
commit84d2fb9a3b9e5bdfacb429c7ac2f6d9379c4a8ce (patch)
tree5150a7714ef155ca9fb0c0c29d43ab7d4f16fb9a /tool
parentb295a5e6c81d040e64c1fe53a14854df591d5fbe (diff)
openpgp: Rework default component lookup functions.
Diffstat (limited to 'tool')
-rw-r--r--tool/src/commands/decrypt.rs2
-rw-r--r--tool/src/sq.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/tool/src/commands/decrypt.rs b/tool/src/commands/decrypt.rs
index a925a413..5557bd25 100644
--- a/tool/src/commands/decrypt.rs
+++ b/tool/src/commands/decrypt.rs
@@ -44,7 +44,7 @@ impl<'a> Helper<'a> {
let mut identities: HashMap<KeyID, Fingerprint> = HashMap::new();
let mut hints: HashMap<KeyID, String> = HashMap::new();
for tsk in secrets {
- let hint = match tsk.userids().primary(None) {
+ let hint = match tsk.primary_userid(None) {
Some(uid) => format!("{} ({})", uid.userid(),
KeyID::from(tsk.fingerprint())),
None => format!("{}", KeyID::from(tsk.fingerprint())),
diff --git a/tool/src/sq.rs b/tool/src/sq.rs
index c9559b7d..069e3252 100644
--- a/tool/src/sq.rs
+++ b/tool/src/sq.rs
@@ -308,7 +308,7 @@ fn real_main() -> Result<(), failure::Error> {
let cert = Cert::from_reader(input)?;
let addr = m.value_of("address").map(|a| a.to_string())
.or_else(|| {
- cert.userids().primary(None)
+ cert.primary_userid(None)
.map(|ca| ca.userid().to_string())
});
let ac = autocrypt::AutocryptHeader::new_sender(