diff options
author | Neal H. Walfield <neal@pep.foundation> | 2019-09-18 16:04:18 +0200 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2019-09-18 16:04:18 +0200 |
commit | 044854773282eed2be23aab511d5dc38ffbe21ca (patch) | |
tree | d3affcb154624eab106d06c254128730be868f1b /openpgp/src/parse | |
parent | c619dffe8562872ad33c501b7f3c3cd9edb7f00b (diff) |
openpgp: Combine Signature4::signature_alive and its _at variant.
- Combine Signature4::signature_alive and
Signature4::signature_alive_at.
- Use an Into<Option<time::Tm>> to distinguish the two previous
cases: the current time (None), and a specific time (a time::Tm).
Diffstat (limited to 'openpgp/src/parse')
-rw-r--r-- | openpgp/src/parse/stream.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/openpgp/src/parse/stream.rs b/openpgp/src/parse/stream.rs index 7ab8033d..6a1246af 100644 --- a/openpgp/src/parse/stream.rs +++ b/openpgp/src/parse/stream.rs @@ -479,7 +479,7 @@ impl<'a, H: VerificationHelper> Verifier<'a, H> { if let Some(sig) = sig { sig.key_flags().can_sign() // Check expiry. - && sig.signature_alive_at(t) + && sig.signature_alive(t) && sig.key_alive(key, t) } else { false @@ -627,7 +627,7 @@ impl<'a, H: VerificationHelper> Verifier<'a, H> { = tpk.keys_all().nth(*j) .unwrap(); if sig.verify(key).unwrap_or(false) - && sig.signature_alive_at(self.time) + && sig.signature_alive(self.time) { VerificationResult::GoodChecksum (sig, tpk, key, binding, @@ -1298,7 +1298,7 @@ impl<'a, H: VerificationHelper + DecryptionHelper> Decryptor<'a, H> { if let Some(sig) = sig { sig.key_flags().can_sign() // Check expiry. - && sig.signature_alive_at(t) + && sig.signature_alive(t) && sig.key_alive(key, t) } else { false @@ -1445,7 +1445,7 @@ impl<'a, H: VerificationHelper + DecryptionHelper> Decryptor<'a, H> { let (binding, revocation, key) = tpk.keys_all().nth(*j).unwrap(); if sig.verify(key).unwrap_or(false) && - sig.signature_alive_at(self.time) + sig.signature_alive(self.time) { // Check intended recipients. if let Some(identity) = |