diff --git a/http-mirage-client.opam b/http-mirage-client.opam index 1a1e4e2..80cafd4 100644 --- a/http-mirage-client.opam +++ b/http-mirage-client.opam @@ -11,19 +11,18 @@ depends: [ "dune" {>= "2.3"} "ocaml" {>= "4.11.0"} "paf" {>= "0.2.0"} - "mirage-clock" {>= "4.0.0"} - "mirage-time" {>= "3.0.0"} "tcpip" {>= "7.0.0"} "lwt" {>= "5.5.0"} "mimic-happy-eyeballs" {>= "0.0.9"} "httpaf" "alcotest-lwt" {with-test & >= "1.0.0"} - "mirage-clock-unix" {with-test & >= "4.0.0"} "mirage-crypto-rng" {with-test} - "mirage-time-unix" {with-test & >= "3.0.0"} + "dns-client-mirage" {with-test & >= "10.0.0"} + "happy-eyeballs-mirage" {with-test & >= "2.0.0"} "h2" {>= "0.10.0"} "tls" {>= "1.0.0"} "x509" {>= "1.0.0"} + "ca-certs-nss" {>= "3.108-1"} ] build: [ ["dune" "subst"] {dev} diff --git a/src/dune b/src/dune index 98aeb80..237d016 100644 --- a/src/dune +++ b/src/dune @@ -1,4 +1,4 @@ (library (name http_mirage_client) (public_name http-mirage-client) - (libraries paf mirage-clock x509 tcpip mimic-happy-eyeballs httpaf h2)) + (libraries paf x509 tcpip mimic-happy-eyeballs httpaf h2 ca-certs-nss)) diff --git a/src/http_mirage_client.ml b/src/http_mirage_client.ml index 1b71a38..ade1835 100644 --- a/src/http_mirage_client.ml +++ b/src/http_mirage_client.ml @@ -22,7 +22,6 @@ module type S = sig end module Make - (Pclock : Mirage_clock.PCLOCK) (TCP : Tcpip.Tcp.S) (Happy_eyeballs : Mimic_happy_eyeballs.S with type flow = TCP.flow) : S = struct @@ -86,9 +85,7 @@ struct | Error _ -> None) | _ -> None - let authenticator = - let module V = Ca_certs_nss.Make (Pclock) in - V.authenticator () + let authenticator = Ca_certs_nss.authenticator () let connect ctx = let k0 happy_eyeballs http_scheme http_hostname http_port = diff --git a/src/http_mirage_client.mli b/src/http_mirage_client.mli index 165f2cd..f56bd1c 100644 --- a/src/http_mirage_client.mli +++ b/src/http_mirage_client.mli @@ -7,7 +7,6 @@ module type S = sig end module Make - (Pclock : Mirage_clock.PCLOCK) (TCP : Tcpip.Tcp.S) (Happy_eyeballs : Mimic_happy_eyeballs.S with type flow = TCP.flow) : S diff --git a/test/dune b/test/dune index cba97d5..76e4114 100644 --- a/test/dune +++ b/test/dune @@ -1,8 +1,7 @@ (executable (name test) (libraries fmt.tty logs.fmt http-mirage-client tcpip.stack-socket paf.mirage - mirage-clock-unix mirage-crypto-rng mirage-time-unix mimic-happy-eyeballs - alcotest-lwt)) + mirage-crypto-rng mimic-happy-eyeballs alcotest-lwt)) (rule (alias runtest) diff --git a/test/test.ml b/test/test.ml index 1453963..2a15ca0 100644 --- a/test/test.ml +++ b/test/test.ml @@ -17,12 +17,10 @@ let () = Logs.set_level ~all:true (Some Logs.Debug) (* Functoria *) module Happy_eyeballs = - Happy_eyeballs_mirage.Make (Time) (Mclock) (Tcpip_stack_socket.V4V6) + Happy_eyeballs_mirage.Make (Tcpip_stack_socket.V4V6) module DNS_client = - Dns_client_mirage.Make (Mirage_crypto_rng) (Time) (Mclock) (Pclock) - (Tcpip_stack_socket.V4V6) - (Happy_eyeballs) + Dns_client_mirage.Make (Tcpip_stack_socket.V4V6) (Happy_eyeballs) module Mimic_happy_eyeballs = Mimic_happy_eyeballs.Make (Tcpip_stack_socket.V4V6) (Happy_eyeballs) @@ -31,8 +29,7 @@ module Mimic_happy_eyeballs = module HTTP_server = Paf_mirage.Make (Tcpip_stack_socket.V4V6.TCP) module HTTP_client = - Http_mirage_client.Make (Pclock) (Tcpip_stack_socket.V4V6.TCP) - (Mimic_happy_eyeballs) + Http_mirage_client.Make (Tcpip_stack_socket.V4V6.TCP) (Mimic_happy_eyeballs) let http_1_1_error_handler ?notify (ipaddr, port) ?request:_ error respond = let contents =