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
|
(* TODO taler_signatures purpose
|
||||||
we use TALER_SIGNATURE_SM_RSA_DENOMINATION_KEY instead here *)
|
we use TALER_SIGNATURE_SM_RSA_DENOMINATION_KEY instead here *)
|
||||||
(* purpose.purpose = TALER_SIGNATURE_SM_DENOMINATION_KEY *)
|
(* purpose.purpose = TALER_SIGNATURE_SM_DENOMINATION_KEY *)
|
||||||
type t = {
|
type r = {
|
||||||
h_denom_pub: DenominationHash.t;
|
h_denom_pub: DenominationHash.t;
|
||||||
h_section_name: Hash_64_cstr.t;
|
h_section_name: Hash_64_cstr.t;
|
||||||
anchor_time: TimeAbsoluteNBO.t;
|
anchor_time: TimeAbsoluteNBO.t;
|
||||||
|
|
@ -107,6 +107,18 @@ module DenominationKeyAnnouncementPS = struct
|
||||||
|+ field TimeAbsoluteNBO.bin (fun t -> t.anchor_time)
|
|+ field TimeAbsoluteNBO.bin (fun t -> t.anchor_time)
|
||||||
|+ field TimeRelativeNBO.bin (fun t -> t.duration_withdraw)
|
|+ field TimeRelativeNBO.bin (fun t -> t.duration_withdraw)
|
||||||
|> sealr
|
|> 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
|
end
|
||||||
|
|
||||||
module SigningKeyAnnouncementPS = struct
|
module SigningKeyAnnouncementPS = struct
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,9 @@ let mk_future_denom denom_key_signf
|
||||||
let duration_withdraw =
|
let duration_withdraw =
|
||||||
Timestamp.diff stamp_start stamp_expire_withdraw |> Timestamp.of_span_exn
|
Timestamp.diff stamp_start stamp_expire_withdraw |> Timestamp.of_span_exn
|
||||||
in
|
in
|
||||||
let ps = { h_denom_pub; h_section_name; anchor_time; duration_withdraw } in
|
{ h_denom_pub; h_section_name; anchor_time; duration_withdraw }
|
||||||
ps |> Bin.to_string bin |> denom_key_signf
|
|> Bin.to_string bin
|
||||||
|
|> denom_key_signf
|
||||||
in
|
in
|
||||||
FutureDenom.
|
FutureDenom.
|
||||||
{
|
{
|
||||||
|
|
@ -60,8 +61,9 @@ let mk_future_signkey signkey_signf
|
||||||
let duration =
|
let duration =
|
||||||
Timestamp.diff stamp_start stamp_expire |> Timestamp.of_span_exn
|
Timestamp.diff stamp_start stamp_expire |> Timestamp.of_span_exn
|
||||||
in
|
in
|
||||||
let ps = { exchange_pub; anchor_time; duration } in
|
{ exchange_pub; anchor_time; duration }
|
||||||
ps |> Bin.to_string bin |> signkey_signf
|
|> Bin.to_string bin
|
||||||
|
|> signkey_signf
|
||||||
in
|
in
|
||||||
FutureSignKey.
|
FutureSignKey.
|
||||||
{ key= pub; stamp_start; stamp_expire; stamp_end; signkey_secmod_sig }
|
{ key= pub; stamp_start; stamp_expire; stamp_end; signkey_secmod_sig }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue