summaryrefslogtreecommitdiffstats
path: root/openpgp/src/lib.rs
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2020-01-08 10:10:58 +0100
committerNeal H. Walfield <neal@pep.foundation>2020-01-08 10:23:23 +0100
commit5b0b546ce73cc3a2bfed085726c43635d5519924 (patch)
tree4747952e3ee06339f95ec571681e62d21168d3d0 /openpgp/src/lib.rs
parentf10ceaa4ac04dcafe0bce42eb4fed3832225b594 (diff)
openpgp: Include a reference time in KeyAmalgamation.
- Including the reference time in the KeyAmalgamation structure rather than having the user supply it to the individual methods (like `KeyAmalgamation::alive`) helps ensure that the key is used consistent. For instance, this makes it harder to mistakenly query key's liveness at time t, but then use the current time to determine the key's capabilities.
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 56d88528..c436d3b5 100644
--- a/openpgp/src/lib.rs
+++ b/openpgp/src/lib.rs
@@ -272,6 +272,10 @@ pub enum Error {
#[fail(display = "Not live until {:?}", _0)]
NotYetLive(std::time::SystemTime),
+ /// No binding signature.
+ #[fail(display = "No binding signature at time {:?}", _0)]
+ NoBindingSignature(std::time::SystemTime),
+
/// This marks this enum as non-exhaustive. Do not use this
/// variant.
#[doc(hidden)] #[fail(display = "__Nonexhaustive")] __Nonexhaustive,