summaryrefslogtreecommitdiffstats
path: root/openpgp/src/lib.rs
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2020-01-13 22:36:54 +0100
committerNeal H. Walfield <neal@pep.foundation>2020-01-14 10:34:53 +0100
commit8e89a8f63a5aa6a0f51ed595a34ee20cc2f8bcfa (patch)
tree4bef0d73890bc45f846a08b3c31f36b00b7e2ba6 /openpgp/src/lib.rs
parent33ab7dd6d9b7f92afab67d8e00902a71a677c341 (diff)
openpgp: Rework stream verification logic.
- Select keys only when verifying the signatures: the relevant keys depend on the timestamp in the signature, and different signatures may have different time stamps. - If the signature doens't have a Signature Creation Time stamp, return that the signature is invalid.
Diffstat (limited to 'openpgp/src/lib.rs')
-rw-r--r--openpgp/src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/openpgp/src/lib.rs b/openpgp/src/lib.rs
index c436d3b5..f1d1506e 100644
--- a/openpgp/src/lib.rs
+++ b/openpgp/src/lib.rs
@@ -276,6 +276,10 @@ pub enum Error {
#[fail(display = "No binding signature at time {:?}", _0)]
NoBindingSignature(std::time::SystemTime),
+ /// Invalid key.
+ #[fail(display = "Invalid key: {:?}", _0)]
+ InvalidKey(String),
+
/// This marks this enum as non-exhaustive. Do not use this
/// variant.
#[doc(hidden)] #[fail(display = "__Nonexhaustive")] __Nonexhaustive,