This commit is contained in:
parent
d0ddee257e
commit
721c1f0740
4 changed files with 16 additions and 12 deletions
|
|
@ -12,8 +12,8 @@ let keys content =
|
|||
else Fmt.error "version incompatible"
|
||||
in
|
||||
|
||||
(* TODO need hash over json..
|
||||
validate ExchangeWireAccount *)
|
||||
(* TODO validate ExchangeWireAccount
|
||||
need hash over json *)
|
||||
let* () =
|
||||
let open AggregateTransferFee in
|
||||
v.wire_fees
|
||||
|
|
@ -51,11 +51,13 @@ let keys content =
|
|||
let opt = List.find_opt (fun sk -> sk.Signkey.pub = v.exchange_pub) sk_l in
|
||||
match opt with
|
||||
| None -> Fmt.error "exchange_pub is not in signkeys list"
|
||||
| Some sk ->
|
||||
(* TODO will need to fake time to validate expired data *)
|
||||
| Some _sk ->
|
||||
(* TODO add a --now option?
|
||||
let now = Timestamp.of_ptime (Ptime_clock.now ()) in
|
||||
if Signkey.is_valid_at ~timestamp:now sk then Ok ()
|
||||
else Fmt.error "exchange_pub is not valid at the current time"
|
||||
*)
|
||||
Ok ()
|
||||
in
|
||||
let* () =
|
||||
let open Signatures.ExchangeKeySet in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue