Hcs.Tls_config.Client

hcs · API reference

Client TLS configuration

type verification = 
  | System_certs (* Use system CA certificates *)
  | No_verify (* Disable verification (INSECURE!) *)

Certificate verification mode

type t = {
  verification : verification;
  alpn_protocols : string list option; (* ALPN: "h2"; "http/1.1" *)
}
val default : t
val h2 : t

TLS config for HTTP/2 - advertises h2 protocol

val h2_or_http11 : t

TLS config that prefers HTTP/2 but falls back to HTTP/1.1

val with_alpn : string list -> t -> t
val insecure : t
val insecure_h2 : t
val make_authenticator : t -> (X509.Authenticator.t, string) result

Create tls-eio authenticator from config

val to_tls_config : t -> host:'a -> (Tls.Config.client, string) result

Create Tls.Config.client from our config