diff --git a/sihl/src/dune b/sihl/src/dune index f3e41766..4c432250 100644 --- a/sihl/src/dune +++ b/sihl/src/dune @@ -4,7 +4,7 @@ (libraries sexplib fmt fmt.tty logs logs.fmt lwt lwt.unix tsort conformist base64 yojson ppx_deriving_yojson.runtime safepass ptime ptime.clock.os jwto uuidm opium caqti-lwt caqti-lwt.unix str dune-build-info bos - containers mirage-crypto mirage-crypto-rng cstruct) + containers mirage-crypto mirage-crypto-rng mirage-crypto-rng.unix cstruct) (preprocess (pps ppx_fields_conv ppx_deriving_yojson ppx_deriving.eq ppx_deriving.show ppx_deriving.make ppx_sexp_conv lwt_ppx))) diff --git a/sihl/src/web_csrf.ml b/sihl/src/web_csrf.ml index 5c17360d..73cdd7c3 100644 --- a/sihl/src/web_csrf.ml +++ b/sihl/src/web_csrf.ml @@ -33,6 +33,7 @@ let set token req = *) module Crypto = struct + let () = Mirage_crypto_rng_unix.initialize (module Mirage_crypto_rng.Fortuna) let block_size = 16 (** [token_length] is the amount of bytes used in the unencrypted CSRF tokens. *)