diff --git a/src/binary_formats.ml b/src/binary_formats.ml index 4037a7eb..7547bb34 100644 --- a/src/binary_formats.ml +++ b/src/binary_formats.ml @@ -466,6 +466,26 @@ module DenominationKeyAnnouncementPS = struct |> sealr end +module SigningKeyAnnouncementPS = struct + (* purpose.purpose = TALER_SIGNATURE_SM_SIGNING_KEY *) + type t = { + exchange_pub: ExchangePublicKeyP.t; + anchor_time: TimeAbsoluteNBO.t; + duration: TimeRelativeNBO.t; + } + + let bin = + let open Bin in + Purpose.make_bin Taler_signatures.sm_signing_key @@ fun purpose -> + record (fun _purpose exchange_pub anchor_time duration -> + { exchange_pub; anchor_time; duration }) + |+ Purpose.field purpose + |+ field ExchangePublicKeyP.bin (fun t -> t.exchange_pub) + |+ field TimeAbsoluteNBO.bin (fun t -> t.anchor_time) + |+ field TimeRelativeNBO.bin (fun t -> t.duration) + |> sealr +end + module SingleWithdrawRequestPS = struct (* purpose.purpose = TALER_SIGNATURE_WALLET_RESERVE_WITHDRAW *) type t = { @@ -947,15 +967,6 @@ module CoinPurseRefundConfirmationPS = struct } end -module SigningKeyAnnouncementPS = struct - (* purpose.purpose = TALER_SIGNATURE_SM_SIGNING_KEY *) - type t = { - exchange_pub: ExchangePublicKeyP.t; - anchor_time: TimeAbsoluteNBO.t; - duration: TimeRelativeNBO.t; - } -end - module MasterDenominationKeyRevocationPS = struct (* purpose.purpose = TALER_SIGNATURE_MASTER_DENOMINATION_KEY_REVOKED *) type t = { h_denom_pub: DenominationHash.t } diff --git a/src/management.ml b/src/management.ml index cbc4a510..259c3bc3 100644 --- a/src/management.ml +++ b/src/management.ml @@ -46,15 +46,8 @@ let mk_future_denom denom_secmod_sign_f in let denom_secmod_sig = ps - |> - (* TODO implement - SigningKeyAnnouncementPS.bin *) - Bin.to_string Binary_formats.DenominationKeyAnnouncementPS.bin - |> - (* TODO sig type *) - (* Signature by the denomination security module - (not this denomination rsa signature) *) - denom_secmod_sign_f + |> Bin.to_string Binary_formats.DenominationKeyAnnouncementPS.bin + |> denom_secmod_sign_f in FutureDenom. {