rename signatures.ml
This commit is contained in:
parent
f93f03f7b2
commit
040c9d88ea
12 changed files with 61 additions and 57 deletions
|
|
@ -25,7 +25,7 @@ module Keys_get = struct
|
|||
DenominationKey.of_rsa RsaDenominationKey.{ age_mask; rsa_pub= pub }
|
||||
in
|
||||
let denom_secmod_sig =
|
||||
let open Bin_sig.DenominationKeyAnnouncement in
|
||||
let open Signatures.DenominationKeyAnnouncement in
|
||||
let h_denom_pub = h_pub in
|
||||
let h_section_name = Hash.Cstring.H64.hash section_name in
|
||||
let anchor_time = stamp_start in
|
||||
|
|
@ -62,7 +62,7 @@ module Keys_get = struct
|
|||
} :
|
||||
Signkey_data.t) =
|
||||
let signkey_secmod_sig =
|
||||
let open Bin_sig.SigningKeyAnnouncement in
|
||||
let open Signatures.SigningKeyAnnouncement in
|
||||
let exchange_pub = pub in
|
||||
let anchor_time = stamp_start in
|
||||
let duration = Timestamp.diff stamp_start stamp_expire in
|
||||
|
|
@ -123,7 +123,7 @@ module Keys_post = struct
|
|||
is unknown to the exchange."
|
||||
| Some denom -> Ok denom
|
||||
in
|
||||
let open Bin_sig.DenominationKeyValidity in
|
||||
let open Signatures.DenominationKeyValidity in
|
||||
let r : r =
|
||||
{
|
||||
master= Config.master_public_key;
|
||||
|
|
@ -150,7 +150,7 @@ module Keys_post = struct
|
|||
is unknown to the exchange."
|
||||
| Some signkey -> Ok signkey
|
||||
in
|
||||
let open Bin_sig.ExchangeSigningKeyValidity in
|
||||
let open Signatures.ExchangeSigningKeyValidity in
|
||||
let r : r =
|
||||
{
|
||||
start= signkey.stamp_start;
|
||||
|
|
@ -220,7 +220,7 @@ end
|
|||
module Denom_revoke = struct
|
||||
let verify (module Sm : Secmod.S) h_denom_pub
|
||||
DenomRevocationSignature.{ master_sig } =
|
||||
let open Bin_sig.MasterDenominationKeyRevocation in
|
||||
let open Signatures.MasterDenominationKeyRevocation in
|
||||
verify_f ~f:Sm.verify_with_master_key master_sig { h_denom_pub }
|
||||
|
||||
let do_ ~db_conn (module Sm : Secmod.S) h_denom_pub
|
||||
|
|
@ -251,7 +251,7 @@ end
|
|||
module Signkey_revoke = struct
|
||||
let verify (module Sm : Secmod.S) exchange_pub
|
||||
SignkeyRevocationSignature.{ master_sig } =
|
||||
let open Bin_sig.MasterSigningKeyRevocation in
|
||||
let open Signatures.MasterSigningKeyRevocation in
|
||||
verify_f ~f:Sm.verify_with_master_key master_sig { exchange_pub }
|
||||
|
||||
let do_ ~db_conn (module Sm : Secmod.S) exchange_pub
|
||||
|
|
@ -289,7 +289,7 @@ module Auditors = struct
|
|||
master_sig;
|
||||
validity_start;
|
||||
} =
|
||||
let open Bin_sig.MasterAddAuditor in
|
||||
let open Signatures.MasterAddAuditor in
|
||||
verify_f ~f:Sm.verify_with_master_key master_sig
|
||||
{
|
||||
start_date= validity_start;
|
||||
|
|
@ -338,7 +338,7 @@ end
|
|||
module Auditors_disable = struct
|
||||
let verify (module Sm : Secmod.S) auditor_pub
|
||||
AuditorTeardownMessage.{ master_sig; validity_end } =
|
||||
let open Bin_sig.MasterDelAuditor in
|
||||
let open Signatures.MasterDelAuditor in
|
||||
verify_f ~f:Sm.verify_with_master_key master_sig
|
||||
{ end_date= validity_end; auditor_pub }
|
||||
|
||||
|
|
@ -387,7 +387,7 @@ module Wire_fee = struct
|
|||
closing_fee;
|
||||
wire_fee;
|
||||
} =
|
||||
let open Bin_sig.MasterWireFee in
|
||||
let open Signatures.MasterWireFee in
|
||||
verify_f ~f:Sm.verify_with_master_key master_sig_wire
|
||||
{
|
||||
h_wire_method= Hash.Cstring.H64.hash wire_method;
|
||||
|
|
@ -454,7 +454,7 @@ module Global_fees = struct
|
|||
let kyc_timeout = Time.Relative.forever in
|
||||
let kyc_fee = Amount.dummy_value in
|
||||
(* * *)
|
||||
let open Bin_sig.GlobalFees in
|
||||
let open Signatures.GlobalFees in
|
||||
verify_f ~f:Sm.verify_with_master_key master_sig
|
||||
{
|
||||
start_date;
|
||||
|
|
@ -529,7 +529,7 @@ module Wire = struct
|
|||
let credit_restrictions = "" in
|
||||
let debit_restrictions = "" in
|
||||
let* () =
|
||||
let open Bin_sig.MasterWireDetails in
|
||||
let open Signatures.MasterWireDetails in
|
||||
verify_f ~f:Sm.verify_with_master_key master_sig_wire
|
||||
{
|
||||
h_wire_details= FullPaytoHash.hash payto_uri;
|
||||
|
|
@ -539,7 +539,7 @@ module Wire = struct
|
|||
}
|
||||
in
|
||||
let* () =
|
||||
let open Bin_sig.MasterAddWire in
|
||||
let open Signatures.MasterAddWire in
|
||||
verify_f ~f:Sm.verify_with_master_key master_sig_add
|
||||
{
|
||||
start_date= validity_start;
|
||||
|
|
@ -594,7 +594,7 @@ end
|
|||
module Wire_disable = struct
|
||||
let verify (module Sm : Secmod.S)
|
||||
WireTeardownMessage.{ payto_uri; master_sig_del; validity_end } =
|
||||
let open Bin_sig.MasterDelWire in
|
||||
let open Signatures.MasterDelWire in
|
||||
verify_f ~f:Sm.verify_with_master_key master_sig_del
|
||||
{ end_date= validity_end; h_wire= FullPaytoHash.hash payto_uri }
|
||||
|
||||
|
|
@ -637,7 +637,7 @@ module Drain = struct
|
|||
date;
|
||||
amount;
|
||||
} =
|
||||
let open Bin_sig.MasterDrainProfit in
|
||||
let open Signatures.MasterDrainProfit in
|
||||
verify_f ~f:Sm.verify_with_master_key master_sig
|
||||
{
|
||||
wtid;
|
||||
|
|
@ -677,7 +677,7 @@ module AmlOfficer = struct
|
|||
master_sig;
|
||||
change_date;
|
||||
} =
|
||||
let open Bin_sig.MasterAmlOfficerStatus in
|
||||
let open Signatures.MasterAmlOfficerStatus in
|
||||
let is_active = match is_active with true -> 1_l | false -> 0_l in
|
||||
verify_f ~f:Sm.verify_with_master_key master_sig
|
||||
{
|
||||
|
|
@ -718,7 +718,7 @@ module Partners = struct
|
|||
end_date;
|
||||
wad_fee;
|
||||
} =
|
||||
let open Bin_sig.PartnerConfiguration in
|
||||
let open Signatures.PartnerConfiguration in
|
||||
verify_f ~f:Sm.verify_with_master_key master_sig
|
||||
{
|
||||
partner_pub;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue