refacto verify_denomination/signkey

This commit is contained in:
swrup 2026-02-27 20:28:56 +01:00
parent 77b49d4169
commit 9ace02b222
6 changed files with 120 additions and 170 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