refacto verify_denomination/signkey
This commit is contained in:
parent
d2e546571c
commit
edd2646a86
6 changed files with 120 additions and 170 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue