I’m having issues connecting to an HTTPS service in my application that
is using cohttp and conduit. I get:
Fatal error: exception Failure("No SSL or TLS support compiled into Conduit")
My opam file declares dependencies on tls
and cohttp-lwt-unix
.
The resulting set of packages installed are (excerpt):
$ opam list | grep 'cohttp\|conduit\|tls'
cohttp 5.3.1 An OCaml library for HTTP clients and servers
cohttp-lwt 5.3.0 CoHTTP implementation using the Lwt concurrency library
cohttp-lwt-unix 5.3.0 CoHTTP implementation for Unix and Windows using Lwt
conduit 6.2.1 A network connection establishment library
conduit-lwt 6.2.1 A portable network connection establishment library using Lwt
conduit-lwt-unix 6.2.1 A network connection establishment library for Lwt_unix
tls 0.17.4 Transport Layer Security purely in OCaml
I can make it work by adding the following constraints:
"tls" { < "1.33.0" }
"cohttp-lwt-unix" { < "4.1.0" }
giving me:
$ opam list | grep 'cohttp\|conduit\|tls'
cohttp 4.0.0 An OCaml library for HTTP clients and servers
cohttp-lwt 4.0.0 CoHTTP implementation using the Lwt concurrency library
cohttp-lwt-unix 4.0.0 CoHTTP implementation for Unix and Windows using Lwt
conduit 4.0.2 A network connection establishment library
conduit-lwt 4.0.2 A portable network connection establishment library using Lwt
conduit-lwt-unix 4.0.2 A network connection establishment library for Lwt_unix
tls 0.15.4 Transport Layer Security purely in OCaml
but it doesn’t feel like a satisfying solution. What am I doing wrong?