app/mgit: Initialize the RNG
This commit is contained in:
parent
f0259b04b5
commit
e58a89c4f4
2 changed files with 5 additions and 1 deletions
2
app/dune
2
app/dune
|
@ -1,3 +1,3 @@
|
||||||
(executable
|
(executable
|
||||||
(name mgit)
|
(name mgit)
|
||||||
(libraries mirage-clock-unix logs.fmt fmt.tty git-unix git-kv))
|
(libraries mirage-clock-unix logs.fmt fmt.tty git-unix git-kv mirage-crypto-rng.unix))
|
||||||
|
|
|
@ -169,6 +169,10 @@ let run remote = function
|
||||||
| Ok t -> repl t Unix.stdin
|
| Ok t -> repl t Unix.stdin
|
||||||
| Error (`Msg err) -> Fmt.failwith "%s." err )
|
| Error (`Msg err) -> Fmt.failwith "%s." err )
|
||||||
|
|
||||||
|
let run remote filename_opt =
|
||||||
|
let () = Mirage_crypto_rng_unix.initialize (module Mirage_crypto_rng.Fortuna) in
|
||||||
|
run remote filename_opt
|
||||||
|
|
||||||
let () = match Sys.argv with
|
let () = match Sys.argv with
|
||||||
| [| _; remote; |] -> run remote None
|
| [| _; remote; |] -> run remote None
|
||||||
| [| _; remote; filename; |] when Sys.file_exists filename ->
|
| [| _; remote; filename; |] when Sys.file_exists filename ->
|
||||||
|
|
Loading…
Reference in a new issue