Capnp_rpc_net.Tls_wrapper
val connect_as_server :
[> Eio.Flow.two_way_ty | Eio.Resource.close_ty ] Eio.Std.r ->
Auth.Secret_key.t option ->
(Endpoint.t, [> `Msg of string ]) Stdlib.result
val connect_as_client :
[> Eio.Flow.two_way_ty | Eio.Resource.close_ty ] Eio.Std.r ->
Auth.Secret_key.t Stdlib.Lazy.t ->
Auth.Digest.t ->
(Endpoint.t, [> `Msg of string ]) Stdlib.result
connect_as_client underlying key digest
is an endpoint using flow underlying
. If digest
requires TLS, it performs a TLS handshake. It uses key
as its private key and checks that the server is the one required by auth
.