+ 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
|
||||
|> finish
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue