Commit d7b83c7d authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Move IO out of Tool_tkeygen

parent be34a59c
......@@ -111,6 +111,7 @@ module Tkeygen : CMDLINER_MODULE = struct
end in
let module R = (val make (module P : PARAMS) : S) in
let kp = R.trustee_keygen () in
Printf.printf "I: keypair %s has been generated\n%!" kp.R.id;
let pubkey = "public", kp.R.id ^ ".pubkey", 0o444, kp.R.pub in
let privkey = "private", kp.R.id ^ ".privkey", 0o400, kp.R.priv in
let save (kind, filename, perm, thing) =
......
......@@ -65,7 +65,6 @@ module Make (P : PARSED_PARAMS) : S = struct
(sha256_hex (G.to_string public_key.trustee_public_key))
0 8 |> String.uppercase
in
Printf.printf "I: keypair %s has been generated\n%!" id;
let priv = string_of_number private_key in
let pub = string_of_trustee_public_key G.write public_key in
{id; priv; pub}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment