This commit is contained in:
parent
d4c1181946
commit
91f444208d
2 changed files with 19 additions and 5 deletions
|
|
@ -88,7 +88,7 @@ module DenominationKeyAnnouncementPS = struct
|
|||
(* TODO taler_signatures purpose
|
||||
we use TALER_SIGNATURE_SM_RSA_DENOMINATION_KEY instead here *)
|
||||
(* purpose.purpose = TALER_SIGNATURE_SM_DENOMINATION_KEY *)
|
||||
type t = {
|
||||
type r = {
|
||||
h_denom_pub: DenominationHash.t;
|
||||
h_section_name: Hash_64_cstr.t;
|
||||
anchor_time: TimeAbsoluteNBO.t;
|
||||
|
|
@ -107,6 +107,18 @@ module DenominationKeyAnnouncementPS = struct
|
|||
|+ field TimeAbsoluteNBO.bin (fun t -> t.anchor_time)
|
||||
|+ field TimeRelativeNBO.bin (fun t -> t.duration_withdraw)
|
||||
|> sealr
|
||||
|
||||
module type SIG = sig
|
||||
type t
|
||||
|
||||
val f : (string -> Crypto.EddsaSignature.t) -> r -> t
|
||||
end
|
||||
|
||||
module Sig : SIG = struct
|
||||
type t = Crypto.EddsaSignature.t
|
||||
|
||||
let f signf r = signf @@ Bin.to_string bin r
|
||||
end
|
||||
end
|
||||
|
||||
module SigningKeyAnnouncementPS = struct
|
||||
|
|
|
|||
|
|
@ -31,8 +31,9 @@ let mk_future_denom denom_key_signf
|
|||
let duration_withdraw =
|
||||
Timestamp.diff stamp_start stamp_expire_withdraw |> Timestamp.of_span_exn
|
||||
in
|
||||
let ps = { h_denom_pub; h_section_name; anchor_time; duration_withdraw } in
|
||||
ps |> Bin.to_string bin |> denom_key_signf
|
||||
{ h_denom_pub; h_section_name; anchor_time; duration_withdraw }
|
||||
|> Bin.to_string bin
|
||||
|> denom_key_signf
|
||||
in
|
||||
FutureDenom.
|
||||
{
|
||||
|
|
@ -60,8 +61,9 @@ let mk_future_signkey signkey_signf
|
|||
let duration =
|
||||
Timestamp.diff stamp_start stamp_expire |> Timestamp.of_span_exn
|
||||
in
|
||||
let ps = { exchange_pub; anchor_time; duration } in
|
||||
ps |> Bin.to_string bin |> signkey_signf
|
||||
{ exchange_pub; anchor_time; duration }
|
||||
|> Bin.to_string bin
|
||||
|> signkey_signf
|
||||
in
|
||||
FutureSignKey.
|
||||
{ key= pub; stamp_start; stamp_expire; stamp_end; signkey_secmod_sig }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue