Module Upsycle_router.Util_conduit
include module type of Util_conduit
type 'a peerkey =
| Peerkey of 'a
type 'a fmt :=
('a, Stdlib.Format.formatter, unit, unit Lwt.t) Stdlib.format4 ->
'a
type ic := Lwt_io.input Lwt_io.channel
type oc := Lwt_io.output Lwt_io.channel
type 'a mk_peerkey := Mirage_crypto_ec.Ed25519.pub -> 'a peerkey
val ip_port_of_flow_exn : Conduit_lwt_unix.flow -> Ipaddr.t * int
val ip_port_of_conn_exn : 'a connection -> Ipaddr.t * int
val open_client_connection :
?info_str:string ->
?server_fingerprint:(Mirage_crypto.Hash.hash * Cstruct.t) ->
?client_auth:[ `None | `Cert of string * string ] ->
string ->
Ipaddr.t ->
int ->
'a mk_peerkey ->
'a connection Lwt.t
val start_server :
?info_prefix:string ->
?openssl_cmd:string list ->
string ->
string ->
Ipaddr.t ->
int ->
'a mk_peerkey ->
('a connection -> unit Lwt.t) ->
unit Lwt.t
val send_s : 'a connection -> string -> unit Lwt.t
val send : 'a connection -> 'b Seaboar.Encode.encoder -> 'b -> unit Lwt.t
val send_terminate_message : 'a connection -> unit Lwt.t
val close : 'a Lwt_io.channel -> 'a Lwt_io.channel -> unit Lwt.t
val close_connection : 'a connection -> unit Lwt.t
type fingerprint := Cstruct.t
val capath_authenticator_lwt : string -> X509.Authenticator.t Lwt.t
val key_fingerprints_authenticator :
string ->
(Mirage_crypto.Hash.hash * fingerprint) ->
X509.Authenticator.t
val null_authenticator : string -> X509.Authenticator.t
val mk_prf : ?prepend:string -> ?append:string -> 'a connection -> 'b fmt