+ AuditorSetupMessage
This commit is contained in:
parent
8685182709
commit
97b8e921bc
2 changed files with 55 additions and 9 deletions
30
src/api.ml
30
src/api.ml
|
|
@ -340,3 +340,33 @@ module SignkeyRevocationSignature = struct
|
||||||
|> mem "master_sig" MasterSigningKeyRevocationPS.jsont ~enc
|
|> mem "master_sig" MasterSigningKeyRevocationPS.jsont ~enc
|
||||||
|> finish
|
|> finish
|
||||||
end
|
end
|
||||||
|
|
||||||
|
module AuditorSetupMessage = struct
|
||||||
|
type t = {
|
||||||
|
auditor_url: string;
|
||||||
|
auditor_name: string;
|
||||||
|
auditor_pub: EddsaPublicKey.t;
|
||||||
|
master_sig: MasterAddAuditorPS.t;
|
||||||
|
(* TODO time
|
||||||
|
something about using monotonic system time here! *)
|
||||||
|
validity_start: Timestamp.t;
|
||||||
|
}
|
||||||
|
|
||||||
|
let jsont =
|
||||||
|
let make auditor_url auditor_name auditor_pub master_sig validity_start =
|
||||||
|
{ auditor_url; auditor_name; auditor_pub; master_sig; validity_start }
|
||||||
|
in
|
||||||
|
let auditor_url v = v.auditor_url in
|
||||||
|
let auditor_name v = v.auditor_name in
|
||||||
|
let auditor_pub v = v.auditor_pub in
|
||||||
|
let master_sig v = v.master_sig in
|
||||||
|
let validity_start v = v.validity_start in
|
||||||
|
let open Jsont.Object in
|
||||||
|
map ~kind:"AuditorSetupMessage" make
|
||||||
|
|> mem "auditor_url" Jsont.string ~enc:auditor_url
|
||||||
|
|> mem "auditor_name" Jsont.string ~enc:auditor_name
|
||||||
|
|> mem "auditor_pub" EddsaPublicKey.jsont ~enc:auditor_pub
|
||||||
|
|> mem "master_sig" MasterAddAuditorPS.jsont ~enc:master_sig
|
||||||
|
|> mem "validity_start" Timestamp.jsont ~enc:validity_start
|
||||||
|
|> finish
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -245,6 +245,31 @@ module MasterSigningKeyRevocationPS = struct
|
||||||
include MK (R)
|
include MK (R)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
module MasterAddAuditorPS = struct
|
||||||
|
module R = struct
|
||||||
|
(* purpose.purpose = TALER_SIGNATURE_MASTER_ADD_AUDITOR *)
|
||||||
|
type r = {
|
||||||
|
start_date: TimeAbsoluteNBO.t;
|
||||||
|
auditor_pub: AuditorPublicKeyP.t;
|
||||||
|
h_auditor_url: Hash_64_cstr.t;
|
||||||
|
}
|
||||||
|
|
||||||
|
let bin =
|
||||||
|
let open Bin in
|
||||||
|
Purpose.make_bin Taler_signatures.master_add_auditor @@ fun purpose ->
|
||||||
|
record (fun _purpose start_date auditor_pub h_auditor_url ->
|
||||||
|
{ start_date; auditor_pub; h_auditor_url })
|
||||||
|
|+ Purpose.field purpose
|
||||||
|
|+ field TimeAbsoluteNBO.bin (fun t -> t.start_date)
|
||||||
|
|+ field AuditorPublicKeyP.bin (fun t -> t.auditor_pub)
|
||||||
|
|+ field Hash_64_cstr.bin (fun t -> t.h_auditor_url)
|
||||||
|
|> sealr
|
||||||
|
end
|
||||||
|
|
||||||
|
include R
|
||||||
|
include MK (R)
|
||||||
|
end
|
||||||
|
|
||||||
(* ### BIN IMPL END ### *)
|
(* ### BIN IMPL END ### *)
|
||||||
|
|
||||||
module WithdrawRequestPS = struct
|
module WithdrawRequestPS = struct
|
||||||
|
|
@ -749,15 +774,6 @@ module CoinPurseRefundConfirmationPS = struct
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
module MasterAddAuditorPS = struct
|
|
||||||
(* purpose.purpose = TALER_SIGNATURE_MASTER_ADD_AUDITOR *)
|
|
||||||
type t = {
|
|
||||||
start_date: TimeAbsoluteNBO.t;
|
|
||||||
auditor_pub: AuditorPublicKeyP.t;
|
|
||||||
h_auditor_url: Hash_64_cstr.t;
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
module MasterDelAuditorPS = struct
|
module MasterDelAuditorPS = struct
|
||||||
(* purpose.purpose = TALER_SIGNATURE_MASTER_DEL_AUDITOR *)
|
(* purpose.purpose = TALER_SIGNATURE_MASTER_DEL_AUDITOR *)
|
||||||
type t = {
|
type t = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue