diff --git a/mirage/tls_mirage.ml b/mirage/tls_mirage.ml index c8bc95d5..c7647a1e 100644 --- a/mirage/tls_mirage.ml +++ b/mirage/tls_mirage.ml @@ -9,6 +9,10 @@ module Make (F : V1_LWT.FLOW) (E : V1_LWT.ENTROPY) = struct type buffer = Cstruct.t type +'a io = 'a Lwt.t + let error_message = function + | `Tls msg -> Printf.sprintf "TLS error: %s" msg + | `Flow err -> F.error_message err + module ENTROPY = E (* * XXX 1: Would be nice if this happened behind the scenes.