Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cohttp-lwt-unix.opam
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ depends: [
"dune" {>= "1.1.0"}
"conduit-lwt" {>= "1.0.3"}
"conduit-lwt-tls"
"ca-certs"
"cmdliner"
"magic-mime"
"logs"
Expand Down
2 changes: 1 addition & 1 deletion cohttp-lwt-unix/src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
(preprocess
(pps ppx_sexp_conv))
(libraries fmt logs logs.lwt conduit-lwt conduit-lwt-tls magic-mime lwt.unix
cohttp cohttp-lwt))
ca-certs cohttp cohttp-lwt))
5 changes: 4 additions & 1 deletion cohttp-lwt-unix/src/net.ml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ module IO = Io

type ctx = (Conduit.resolvers[@sexp.opaque]) [@@deriving sexp]

let authenticator ~host:_ _ = Ok None
let authenticator =
match Ca_certs.authenticator () with
| Ok a -> a
| Error (`Msg msg) -> failwith msg

let tls_config =
Tls.Config.client ~authenticator ()
Expand Down