Draft 0.5: identity/registry spec; Phase A signed MA registry, mailbox challenge auth, key rotation, skew rejection
This commit is contained in:
@@ -11,6 +11,12 @@ pub const TYPE_AGGREGATE: &str = "aggregate";
|
||||
pub const EXPOSURE_METADATA: &str = "metadata";
|
||||
pub const EXPOSURE_FULL: &str = "full";
|
||||
|
||||
pub const MAX_CLOCK_SKEW_SECS: u64 = 300;
|
||||
|
||||
pub fn timestamp_is_fresh(ts: u64, now: u64) -> bool {
|
||||
now.abs_diff(ts) <= MAX_CLOCK_SKEW_SECS
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct Envelope {
|
||||
#[serde(rename = "type")]
|
||||
|
||||
Reference in New Issue
Block a user