This commit is contained in:
swrup 2026-02-03 21:31:48 +01:00
parent 0eef08d00f
commit 78203116e9
3 changed files with 32 additions and 3 deletions

View file

@ -155,3 +155,15 @@ let enable_auditor ~output ~master_key ~auditor_url ~auditor_name ~auditor_pub
let* s = Api.encode Api.AuditorSetupMessage.jsont v in
let* () = write_file output s in
Ok ()
let disable_auditor ~output ~master_key ~auditor_pub ~validity_end =
let open Crypto in
let* key = read_master_key_file master_key in
let master_sig =
let open Bin_sig.MasterDelAuditor in
sign_f ~f:(EddsaSignature.sign ~key) { end_date= validity_end; auditor_pub }
in
let v = Api.AuditorTeardownMessage.{ master_sig; validity_end } in
let* s = Api.encode Api.AuditorTeardownMessage.jsont v in
let* () = write_file output s in
Ok ()