diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-11-26 17:54:04 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-11-27 14:09:26 +0100 |
commit | 6fa1c0c42d21c7876c594f9c658742f6639f86b9 (patch) | |
tree | e38d797dbbf38c7ce5a1c8ca45a04a7ecbe316b6 /openpgp/examples | |
parent | a52f66d26bdef3ce9c8948aa058dff39048e16c3 (diff) |
openpgp: Fix Signature::get_issuer to return set of issuers.
- A signature can contain multiple hints as to who created the
signature. Return all those hints to the caller.
- Adapt all callers accordingly.
- Fixes #264.
Diffstat (limited to 'openpgp/examples')
-rw-r--r-- | openpgp/examples/web-of-trust.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/openpgp/examples/web-of-trust.rs b/openpgp/examples/web-of-trust.rs index 754a7b13..34cbe289 100644 --- a/openpgp/examples/web-of-trust.rs +++ b/openpgp/examples/web-of-trust.rs @@ -10,6 +10,7 @@ use std::env; extern crate sequoia_openpgp as openpgp; +use crate::openpgp::KeyID; use crate::openpgp::tpk::TPKParser; use crate::openpgp::parse::Parse; @@ -39,14 +40,12 @@ fn main() { let keyid = tpk.keyid(); for uidb in tpk.userids() { for tps in uidb.certifications() { - if let Some(issuer) = tps.get_issuer() { + for issuer in tps.get_issuers() { println!("{}, {:?}, {}", - issuer.as_u64().unwrap(), + KeyID::from(issuer).as_u64().unwrap(), String::from_utf8_lossy( uidb.userid().value()), keyid.as_u64().unwrap()); - } else { - eprintln!("No issuer!?"); } } } |