summaryrefslogtreecommitdiffstats
path: root/openpgp/examples/web-of-trust.rs
diff options
context:
space:
mode:
Diffstat (limited to 'openpgp/examples/web-of-trust.rs')
-rw-r--r--openpgp/examples/web-of-trust.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/openpgp/examples/web-of-trust.rs b/openpgp/examples/web-of-trust.rs
index 34cbe289..a4fe3d0f 100644
--- a/openpgp/examples/web-of-trust.rs
+++ b/openpgp/examples/web-of-trust.rs
@@ -11,7 +11,7 @@ use std::env;
extern crate sequoia_openpgp as openpgp;
use crate::openpgp::KeyID;
-use crate::openpgp::tpk::TPKParser;
+use crate::openpgp::cert::CertParser;
use crate::openpgp::parse::Parse;
fn main() {
@@ -31,14 +31,14 @@ fn main() {
// For each input file, create a parser.
for input in &args[1..] {
eprintln!("Parsing {}...", input);
- let parser = TPKParser::from_file(input)
+ let parser = CertParser::from_file(input)
.expect("Failed to create reader");
- for tpk in parser {
- match tpk {
- Ok(tpk) => {
- let keyid = tpk.keyid();
- for uidb in tpk.userids() {
+ for cert in parser {
+ match cert {
+ Ok(cert) => {
+ let keyid = cert.keyid();
+ for uidb in cert.userids() {
for tps in uidb.certifications() {
for issuer in tps.get_issuers() {
println!("{}, {:?}, {}",
@@ -51,7 +51,7 @@ fn main() {
}
},
Err(e) =>
- eprintln!("Parsing TPK failed: {}", e),
+ eprintln!("Parsing Cert failed: {}", e),
}
}
}