diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-11-25 14:04:41 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-12-09 13:24:56 +0100 |
commit | 531e3252b86f6eacf02d7181c280e8c01c4a55f4 (patch) | |
tree | 998ac3f660f37e9163f124dcec279749b977a168 /tool/src/commands/inspect.rs | |
parent | 7f3d55f777f44f9046ac91afe8e398984f1e4ba1 (diff) |
openpgp: Return Result from Signature::signature_alive.
- See #371.
Diffstat (limited to 'tool/src/commands/inspect.rs')
-rw-r--r-- | tool/src/commands/inspect.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tool/src/commands/inspect.rs b/tool/src/commands/inspect.rs index 42d30530..f2347610 100644 --- a/tool/src/commands/inspect.rs +++ b/tool/src/commands/inspect.rs @@ -151,11 +151,10 @@ fn inspect_cert(output: &mut dyn io::Write, cert: &openpgp::Cert, writeln!(output, " UserID: {}", uidb.userid())?; inspect_revocation(output, "", uidb.revoked(None))?; if let Some(sig) = uidb.binding_signature(None) { - if sig.signature_expired(None) { - writeln!(output, " Expired")?; - } else if ! sig.signature_alive(None, - std::time::Duration::new(0, 0)) { - writeln!(output, " Not yet valid")?; + if let Err(e) = + sig.signature_alive(None, std::time::Duration::new(0, 0)) + { + writeln!(output, " Invalid: {}", e)?; } } inspect_certifications(output, |