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* () =
|
||||
Hashtbl.to_seq t.dn_key_ht
|
||||
|> List.of_seq
|
||||
|> list_iter (fun (pub, priv) ->
|
||||
let* section_name =
|
||||
match Hashtbl.find_opt t.dn_section_name_ht pub with
|
||||
| None -> Error "invalid state, section_name not found"
|
||||
| Some s -> Ok s
|
||||
in
|
||||
write_rsa (dn_fname section_name) priv)
|
||||
|> list_iter (fun (h_pub, priv) ->
|
||||
match Hashtbl.find_opt t.dn_section_name_ht h_pub with
|
||||
| None ->
|
||||
Fmt.failwith "secmod save: invalid state, section_name not found"
|
||||
| Some section_name -> write_rsa (dn_fname section_name) priv)
|
||||
in
|
||||
Logs.info (fun m -> m "saved secmod private keys data");
|
||||
Ok ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue