This commit is contained in:
swrup 2026-02-27 20:57:30 +01:00
parent 274323d737
commit 6bb14fcbf6
3 changed files with 17 additions and 23 deletions

View file

@ -8,5 +8,15 @@ type t = {
master_sig: Signatures.ExchangeSigningKeyValidity.t;
}
let verify_exchange_signing_key_validity ~key sk =
let open Signatures.ExchangeSigningKeyValidity in
verify key sk.master_sig
{
R.start= sk.stamp_start;
expire= sk.stamp_expire;
end_= sk.stamp_end;
signkey_pub= sk.pub;
}
let is_valid_at ~timestamp sk =
Timestamp.geq sk.stamp_start timestamp && Timestamp.lt timestamp sk.stamp_end