This commit is contained in:
parent
ffe4760fd6
commit
dd8f57a5ac
1 changed files with 5 additions and 7 deletions
|
|
@ -470,13 +470,11 @@ module Make (Conn : Pg.CONN) = struct
|
||||||
let* () =
|
let* () =
|
||||||
Hashtbl.to_seq t.dn_key_ht
|
Hashtbl.to_seq t.dn_key_ht
|
||||||
|> List.of_seq
|
|> List.of_seq
|
||||||
|> list_iter (fun (pub, priv) ->
|
|> list_iter (fun (h_pub, priv) ->
|
||||||
let* section_name =
|
match Hashtbl.find_opt t.dn_section_name_ht h_pub with
|
||||||
match Hashtbl.find_opt t.dn_section_name_ht pub with
|
| None ->
|
||||||
| None -> Error "invalid state, section_name not found"
|
Fmt.failwith "secmod save: invalid state, section_name not found"
|
||||||
| Some s -> Ok s
|
| Some section_name -> write_rsa (dn_fname section_name) priv)
|
||||||
in
|
|
||||||
write_rsa (dn_fname section_name) priv)
|
|
||||||
in
|
in
|
||||||
Logs.info (fun m -> m "saved secmod private keys data");
|
Logs.info (fun m -> m "saved secmod private keys data");
|
||||||
Ok ()
|
Ok ()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue