diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-05-16 17:11:26 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-05-16 17:11:26 +0200 |
commit | ba036bfb1f4c6def2f916b9ef135ec7b5a98fcdb (patch) | |
tree | 0c40bf4d07a500c100c20313d9125aac2efb5cb9 /sqv/src/sqv.rs | |
parent | c05e6e2dbd4f0e22a1b74c3e9ef8f05b4479aad8 (diff) |
openpgp: Introduce trait Policy. WIPfix-274
- Add a new trait `sequoia_openpgp::Policy`. Currently, this trait
only has one method that returns the current time. This time is
used when evaluating signatures.
- Use this trait in TPK::{revocation_status,alive,expired}. Remove
the corresponding *_at() functions.
- Fixes #274.
Diffstat (limited to 'sqv/src/sqv.rs')
-rw-r--r-- | sqv/src/sqv.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sqv/src/sqv.rs b/sqv/src/sqv.rs index 873ca9e8..e09dc7c9 100644 --- a/sqv/src/sqv.rs +++ b/sqv/src/sqv.rs @@ -14,7 +14,7 @@ use std::process::exit; use std::fs::File; use std::collections::{HashMap, HashSet}; -use openpgp::{TPK, Packet, packet::Signature, KeyID, RevocationStatus}; +use openpgp::{TPK, Packet, packet::Signature, KeyID, RevocationStatus, Policy}; use openpgp::constants::HashAlgorithm; use openpgp::crypto::Hash; use openpgp::parse::{Parse, PacketParserResult, PacketParser}; @@ -273,7 +273,7 @@ fn real_main() -> Result<(), failure::Error> { } } - if tpk.revocation_status_at(t) + if tpk.revocation_status(&t as &Policy) != RevocationStatus::NotAsFarAsWeKnow { eprintln!( |