diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 60f7b2e..f54e37c 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -6,7 +6,7 @@ jobs:
     runs-on: ${{ matrix.operating-system }}
     strategy:
       matrix:
-        ocaml-version: [ '4.08.1', '4.09.0', '4.10.0', '4.11.1' ]
+        ocaml-version: [ '4.11.2', '4.12.1', '4.13.1', '4.14.0' ]
         operating-system: [ ubuntu-latest ]
     steps:
     - uses: actions/checkout@v2
diff --git a/.ocamlformat b/.ocamlformat
index 14fd10a..4eae793 100644
--- a/.ocamlformat
+++ b/.ocamlformat
@@ -1,4 +1,4 @@
-version = 0.18.0
+version = 0.19.0
 profile = conventional
 break-infix = fit-or-vertical
 parse-docstrings = true
diff --git a/CHANGES.md b/CHANGES.md
index 78fcfcf..17e5c40 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,3 +1,24 @@
+## v5.1.1 (2022-07-04)
+
+* conduit-mirage: pass peer name to Tls.Config.client, fixes
+  mirleft/ocaml-tls#474 reported by @palainp (#414 @hannesm)
+* conduit-async: update to jane street v0.15 (#414 @hannesm)
+
+## v5.1.0 (2022-03-02)
+
+* conduit-mirage: avoid exception in TLS.listen (#413 @hannesm)
+* conduit-mirage: update to tcpip 7.0.0 and remove mirage-stack dependency (#413 @hannesm)
+
+## v5.0.0 (2021-10-20)
+
+* change the type of `Conduit_lwt_tls.X509.default_authenticator` and
+  `Conduit_lwt_unix.default_ctx` to be lazy, avoiding various side-effects
+  (system interactions, logging) due to constructing these values at
+  initialisation time. (@craigfe, #395 #404)
+* Adapt conduit-mirage to dns-client 6.0.0 API (#406 @hannesm)
+* Use Lwt.pause instead of Lwt_unix.yield (#403 @MisterDA)
+* Avoid deprecated Fmt.kstrf (#407 @hannesm)
+
 ## v4.0.2 (2021-10-09)
 
 * Adapt conduit-mirage to tls 0.15.0 (@hannesm #404)
diff --git a/conduit-async.opam b/conduit-async.opam
index 7f0ca38..576d968 100644
--- a/conduit-async.opam
+++ b/conduit-async.opam
@@ -1,4 +1,3 @@
-version: "4.0.2"
 opam-version: "2.0"
 maintainer: "anil@recoil.org"
 authors: [
@@ -10,14 +9,14 @@ homepage: "https://github.com/mirage/ocaml-conduit"
 bug-reports: "https://github.com/mirage/ocaml-conduit/issues"
 depends: [
   "ocaml" {>= "4.03.0"}
-  "dune"
-  "core"
+  "dune" {>= "2.0"}
+  "core" {>= "v0.15.0"}
   "uri" {>= "4.0.0"}
   "ppx_here" {>= "v0.9.0"}
   "ppx_sexp_conv" {>="v0.13.0"}
   "sexplib"
   "conduit" {=version}
-  "async" {>= "v0.10.0"}
+  "async" {>= "v0.15.0"}
   "ipaddr" {>= "3.0.0"}
   "ipaddr-sexp" {>= "4.0.0"}
 ]
@@ -26,8 +25,8 @@ conflicts: [
   "async_ssl" {< "v0.9.0"}
 ]
 build: [
-  ["dune" "subst"] {pinned}
+  ["dune" "subst"] {dev}
   ["dune" "build" "-p" name "-j" jobs]
 ]
 dev-repo: "git+https://github.com/mirage/ocaml-conduit.git"
-synopsis: "A network connection establishment library for Async"
\ No newline at end of file
+synopsis: "A network connection establishment library for Async"
diff --git a/conduit-lwt-unix.opam b/conduit-lwt-unix.opam
index 6a66644..fda23e3 100644
--- a/conduit-lwt-unix.opam
+++ b/conduit-lwt-unix.opam
@@ -1,4 +1,3 @@
-version: "4.0.2"
 opam-version: "2.0"
 maintainer: "anil@recoil.org"
 authors: [
@@ -10,7 +9,7 @@ homepage: "https://github.com/mirage/ocaml-conduit"
 bug-reports: "https://github.com/mirage/ocaml-conduit/issues"
 depends: [
   "ocaml" {>= "4.07.0"}
-  "dune"
+  "dune" {>= "2.0"}
   "base-unix"
   "logs"
   "ppx_sexp_conv" {>="v0.13.0"}
@@ -30,8 +29,8 @@ conflicts: [
   "ssl" {< "0.5.9"}
 ]
 build: [
-  ["dune" "subst"] {pinned}
+  ["dune" "subst"] {dev}
   ["dune" "build" "-p" name "-j" jobs]
 ]
 dev-repo: "git+https://github.com/mirage/ocaml-conduit.git"
-synopsis: "A network connection establishment library for Lwt_unix"
\ No newline at end of file
+synopsis: "A network connection establishment library for Lwt_unix"
diff --git a/conduit-lwt.opam b/conduit-lwt.opam
index 9c1f54a..655cef4 100644
--- a/conduit-lwt.opam
+++ b/conduit-lwt.opam
@@ -1,4 +1,3 @@
-version: "4.0.2"
 opam-version: "2.0"
 maintainer: "anil@recoil.org"
 authors: [
@@ -10,7 +9,7 @@ homepage: "https://github.com/mirage/ocaml-conduit"
 bug-reports: "https://github.com/mirage/ocaml-conduit/issues"
 depends: [
   "ocaml" {>= "4.03.0"}
-  "dune"
+  "dune" {>= "2.0"}
   "base-unix"
   "ppx_sexp_conv" {>="v0.13.0"}
   "sexplib"
@@ -18,8 +17,8 @@ depends: [
   "lwt" {>= "3.0.0"}
 ]
 build: [
-  ["dune" "subst"] {pinned}
+  ["dune" "subst"] {dev}
   ["dune" "build" "-p" name "-j" jobs]
 ]
 dev-repo: "git+https://github.com/mirage/ocaml-conduit.git"
-synopsis: "A portable network connection establishment library using Lwt"
\ No newline at end of file
+synopsis: "A portable network connection establishment library using Lwt"
diff --git a/conduit-mirage.opam b/conduit-mirage.opam
index 2111271..fced3e2 100644
--- a/conduit-mirage.opam
+++ b/conduit-mirage.opam
@@ -1,4 +1,3 @@
-version: "4.0.2"
 opam-version: "2.0"
 maintainer: "anil@recoil.org"
 authors: ["Anil Madhavapeddy" "Thomas Leonard" "Thomas Gazagnaire"]
@@ -8,18 +7,17 @@ homepage: "https://github.com/mirage/ocaml-conduit"
 bug-reports: "https://github.com/mirage/ocaml-conduit/issues"
 depends: [
   "ocaml" {>= "4.07.0"}
-  "dune"
+  "dune" {>= "2.0"}
   "ppx_sexp_conv" {>="v0.13.0"}
   "sexplib"
   "uri" {>= "4.0.0"}
   "cstruct" {>= "3.0.0"}
-  "mirage-stack" {>= "2.2.0"}
   "mirage-clock" {>= "3.0.0"}
   "mirage-flow" {>= "2.0.0"}
   "mirage-flow-combinators" {>= "2.0.0"}
   "mirage-random" {>= "2.0.0"}
   "mirage-time" {>= "2.0.0"}
-  "dns-client" {>= "5.0.0"}
+  "dns-client" {>= "6.0.0"}
   "conduit-lwt" {=version}
   "vchan" {>= "5.0.0"}
   "xenstore"
@@ -28,16 +26,17 @@ depends: [
   "ca-certs-nss"
   "ipaddr" {>= "3.0.0"}
   "ipaddr-sexp"
-  "tcpip" {with-test}
+  "tcpip" {>= "7.0.0"}
+  "fmt" {>= "0.8.7"}
 ]
 conflicts: [
   "mirage-conduit"
 ]
 
 build: [
-  ["dune" "subst"] {pinned}
+  ["dune" "subst"] {dev}
   ["dune" "build" "-p" name "-j" jobs]
   ["dune" "runtest" "-p" name] {with-test}
 ]
 dev-repo: "git+https://github.com/mirage/ocaml-conduit.git"
-synopsis: "A network connection establishment library for MirageOS"
\ No newline at end of file
+synopsis: "A network connection establishment library for MirageOS"
diff --git a/conduit.opam b/conduit.opam
index 4af019d..d48c757 100644
--- a/conduit.opam
+++ b/conduit.opam
@@ -1,4 +1,3 @@
-version: "4.0.2"
 opam-version: "2.0"
 maintainer: "anil@recoil.org"
 authors: [
@@ -11,7 +10,7 @@ doc: "https://mirage.github.io/ocaml-conduit/"
 bug-reports: "https://github.com/mirage/ocaml-conduit/issues"
 depends: [
   "ocaml" {>= "4.03.0"}
-  "dune"
+  "dune" {>= "2.0"}
   "ppx_sexp_conv" {>="v0.13.0"}
   "sexplib"
   "astring"
@@ -21,7 +20,7 @@ depends: [
   "ipaddr-sexp"
 ]
 build: [
-  ["dune" "subst"] {pinned}
+  ["dune" "subst"] {dev}
   ["dune" "build" "-p" name "-j" jobs]
 ]
 dev-repo: "git+https://github.com/mirage/ocaml-conduit.git"
@@ -46,4 +45,4 @@ The useful opam packages available that extend this library are:
 - `conduit-lwt-unix`: the Lwt/Unix implementation
 - `conduit-async` the Jane Street Async implementation
 - `conduit-mirage`: the MirageOS compatible implementation
-"""
\ No newline at end of file
+"""
diff --git a/debian/changelog b/debian/changelog
index 4f516dc..ffdc6f0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+ocaml-conduit (5.1.1+ds-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Fri, 22 Jul 2022 01:16:18 -0000
+
 ocaml-conduit (4.0.2-3) unstable; urgency=medium
 
   * Fix FTBFS on bytecode architectures (Closes: #1003741)
diff --git a/dune-project b/dune-project
index 192ba93..274b40e 100644
--- a/dune-project
+++ b/dune-project
@@ -1,3 +1,2 @@
 (lang dune 2.0)
 (name conduit)
-(version v4.0.2)
diff --git a/src/conduit-lwt-unix/conduit_lwt_server.ml b/src/conduit-lwt-unix/conduit_lwt_server.ml
index 7184d56..322137a 100644
--- a/src/conduit-lwt-unix/conduit_lwt_server.ml
+++ b/src/conduit-lwt-unix/conduit_lwt_server.ml
@@ -99,6 +99,6 @@ let init ?(stop = fst (Lwt.wait ())) handler fd =
             Log.warn (fun f ->
                 f "Uncaught exception accepting connection: %s"
                   (Printexc.to_string ex));
-            Lwt_unix.yield () >>= loop)
+            Lwt.pause () >>= loop)
   in
   Lwt.finalize loop (fun () -> Lwt_unix.close fd)
diff --git a/src/conduit-lwt-unix/conduit_lwt_tls.dummy.ml b/src/conduit-lwt-unix/conduit_lwt_tls.dummy.ml
index a20e690..aca0f47 100644
--- a/src/conduit-lwt-unix/conduit_lwt_tls.dummy.ml
+++ b/src/conduit-lwt-unix/conduit_lwt_tls.dummy.ml
@@ -3,7 +3,7 @@ module X509 = struct
 
   type authenticator = unit
 
-  let default_authenticator = ()
+  let default_authenticator = lazy ()
 end
 
 module Client = struct
diff --git a/src/conduit-lwt-unix/conduit_lwt_tls.dummy.mli b/src/conduit-lwt-unix/conduit_lwt_tls.dummy.mli
index bed1b28..27a3e4d 100644
--- a/src/conduit-lwt-unix/conduit_lwt_tls.dummy.mli
+++ b/src/conduit-lwt-unix/conduit_lwt_tls.dummy.mli
@@ -22,7 +22,7 @@ module X509 : sig
 
   type authenticator = unit
 
-  val default_authenticator : authenticator
+  val default_authenticator : authenticator Lazy.t
 end
 
 module Client : sig
diff --git a/src/conduit-lwt-unix/conduit_lwt_tls.real.ml b/src/conduit-lwt-unix/conduit_lwt_tls.real.ml
index 148345b..8c7b1cf 100644
--- a/src/conduit-lwt-unix/conduit_lwt_tls.real.ml
+++ b/src/conduit-lwt-unix/conduit_lwt_tls.real.ml
@@ -23,9 +23,10 @@ module X509 = struct
   type authenticator = X509.Authenticator.t
 
   let default_authenticator =
-    match Ca_certs.authenticator () with
-    | Ok a -> a
-    | Error (`Msg msg) -> failwith msg
+    lazy
+      (match Ca_certs.authenticator () with
+      | Ok a -> a
+      | Error (`Msg msg) -> failwith msg)
 end
 
 module Client = struct
diff --git a/src/conduit-lwt-unix/conduit_lwt_tls.real.mli b/src/conduit-lwt-unix/conduit_lwt_tls.real.mli
index fa831cc..1ad51ed 100644
--- a/src/conduit-lwt-unix/conduit_lwt_tls.real.mli
+++ b/src/conduit-lwt-unix/conduit_lwt_tls.real.mli
@@ -23,7 +23,7 @@ module X509 : sig
 
   type authenticator = X509.Authenticator.t
 
-  val default_authenticator : authenticator
+  val default_authenticator : authenticator Lazy.t
 end
 
 module Client : sig
diff --git a/src/conduit-lwt-unix/conduit_lwt_unix.ml b/src/conduit-lwt-unix/conduit_lwt_unix.ml
index 3569966..33deaeb 100644
--- a/src/conduit-lwt-unix/conduit_lwt_unix.ml
+++ b/src/conduit-lwt-unix/conduit_lwt_unix.ml
@@ -149,14 +149,16 @@ let flow_of_fd fd sa =
       TCP { fd; ip = Ipaddr_unix.of_inet_addr ip; port }
 
 let default_ctx =
-  {
-    src = None;
-    tls_own_key = `None;
-    tls_authenticator = Conduit_lwt_tls.X509.default_authenticator;
-  }
+  lazy
+    {
+      src = None;
+      tls_own_key = `None;
+      tls_authenticator = Lazy.force Conduit_lwt_tls.X509.default_authenticator;
+    }
 
 let init ?src ?(tls_own_key = `None)
-    ?(tls_authenticator = Conduit_lwt_tls.X509.default_authenticator) () =
+    ?(tls_authenticator = Lazy.force Conduit_lwt_tls.X509.default_authenticator)
+    () =
   match src with
   | None -> Lwt.return { src = None; tls_own_key; tls_authenticator }
   | Some host -> (
diff --git a/src/conduit-lwt-unix/conduit_lwt_unix.mli b/src/conduit-lwt-unix/conduit_lwt_unix.mli
index cdcb032..1fb1d9d 100644
--- a/src/conduit-lwt-unix/conduit_lwt_unix.mli
+++ b/src/conduit-lwt-unix/conduit_lwt_unix.mli
@@ -153,7 +153,7 @@ type ctx [@@deriving sexp_of]
 
 (** {2 Connection and listening} *)
 
-val default_ctx : ctx
+val default_ctx : ctx Lazy.t
 (** Default context that listens on all source addresses with no TLS certificate
     associated with the Conduit *)
 
diff --git a/src/conduit-mirage/conduit_mirage.ml b/src/conduit-mirage/conduit_mirage.ml
index 37a5550..5e3bf17 100644
--- a/src/conduit-mirage/conduit_mirage.ml
+++ b/src/conduit-mirage/conduit_mirage.ml
@@ -16,11 +16,14 @@
  *
  *)
 
+let src = Logs.Src.create "conduit_mirage" ~doc:"Conduit Mirage"
+
+module Log = (val Logs.src_log src : Logs.LOG)
 open Sexplib.Conv
 
 let ( >>= ) = Lwt.( >>= )
 let ( >|= ) = Lwt.( >|= )
-let fail fmt = Fmt.kstrf (fun s -> Lwt.fail (Failure s)) fmt
+let fail fmt = Fmt.kstr (fun s -> Lwt.fail (Failure s)) fmt
 let err_tcp_not_supported = fail "%s: TCP is not supported"
 let err_tls_not_supported = fail "%s: TLS is not supported"
 
@@ -63,7 +66,7 @@ end
 let tcp_client i p = Lwt.return (`TCP (i, p))
 let tcp_server _ p = Lwt.return (`TCP p)
 
-module TCP (S : Mirage_stack.V4V6) = struct
+module TCP (S : Tcpip.Stack.V4V6) = struct
   module Flow = S.TCP
 
   type flow = Flow.flow
@@ -85,7 +88,7 @@ module TCP (S : Mirage_stack.V4V6) = struct
     match s with
     | `TCP port ->
         let s, _u = Lwt.task () in
-        S.listen_tcp t ~port (fun flow -> fn flow);
+        S.TCP.listen (S.tcp t) ~port (fun flow -> fn flow);
         s
     | _ -> err_not_supported s "listen"
 end
@@ -141,7 +144,12 @@ end
 
 (* TLS *)
 
-let tls_client ~authenticator x = `TLS (Tls.Config.client ~authenticator (), x)
+let tls_client ~host ~authenticator x =
+  let peer_name =
+    Result.to_option (Result.bind (Domain_name.of_string host) Domain_name.host)
+  in
+  `TLS (Tls.Config.client ?peer_name ~authenticator (), x)
+
 let tls_server ?authenticator x = `TLS (Tls.Config.server ?authenticator (), x)
 
 module TLS (S : S) = struct
@@ -198,14 +206,12 @@ module TLS (S : S) = struct
     let close = function TLS f -> TLS.close f | Clear f -> S.Flow.close f
   end
 
-  let err_flow_write m e = fail "%s: %a" m TLS.pp_write_error e
-
   let connect (t : t) (c : client) =
     match c with
     | `TLS (c, x) -> (
         S.connect t x >>= fun flow ->
         TLS.client_of_flow c flow >>= function
-        | Error e -> err_flow_write "connect" e
+        | Error e -> fail "connect: %a" TLS.pp_write_error e
         | Ok flow -> Lwt.return (TLS flow))
     | _ -> S.connect t c >|= fun t -> Clear t
 
@@ -214,7 +220,9 @@ module TLS (S : S) = struct
     | `TLS (c, x) ->
         S.listen t x (fun flow ->
             TLS.server_of_flow c flow >>= function
-            | Error e -> err_flow_write "listen" e
+            | Error e ->
+                Log.info (fun m -> m "listen: %a" TLS.pp_write_error e);
+                Lwt.return_unit
             | Ok flow -> fn (TLS flow))
     | _ -> S.listen t s (fun f -> fn (Clear f))
 end
@@ -232,9 +240,9 @@ module Endpoint (P : Mirage_clock.PCLOCK) = struct
     | `TCP (x, y) -> tcp_client x y
     | `Unix_domain_socket _ -> err_domain_sockets_not_supported "client"
     | (`Vchan_direct _ | `Vchan_domain_socket _) as x -> vchan_client x
-    | `TLS (_host, y) ->
+    | `TLS (host, y) ->
         client ~tls_authenticator y
-        >|= tls_client ~authenticator:tls_authenticator
+        >|= tls_client ~host ~authenticator:tls_authenticator
     | `Unknown s -> err_unknown s
 
   let rec server ?tls_authenticator e =
diff --git a/src/conduit-mirage/conduit_mirage.mli b/src/conduit-mirage/conduit_mirage.mli
index 7454ca1..e0c7b7f 100644
--- a/src/conduit-mirage/conduit_mirage.mli
+++ b/src/conduit-mirage/conduit_mirage.mli
@@ -79,7 +79,7 @@ end
 
 (** {2 TCP} *)
 
-module TCP (S : Mirage_stack.V4V6) :
+module TCP (S : Tcpip.Stack.V4V6) :
   S with type t = S.t and type flow = S.TCP.flow
 
 (** {2 VCHAN} *)
diff --git a/src/conduit-mirage/dune b/src/conduit-mirage/dune
index f0e2d8c..e80168b 100644
--- a/src/conduit-mirage/dune
+++ b/src/conduit-mirage/dune
@@ -5,6 +5,6 @@
   (pps ppx_sexp_conv))
  (modules conduit_mirage resolver_mirage conduit_xenstore)
  (wrapped false)
- (libraries conduit conduit-lwt mirage-stack mirage-clock mirage-random
-   mirage-time mirage-flow mirage-flow-combinators dns-client.mirage
-   ipaddr-sexp vchan tls tls-mirage xenstore.client uri.services ca-certs-nss))
+ (libraries conduit conduit-lwt tcpip mirage-clock mirage-random mirage-time
+   mirage-flow mirage-flow-combinators dns-client.mirage ipaddr-sexp vchan
+   tls tls-mirage xenstore.client uri.services ca-certs-nss fmt))
diff --git a/src/conduit-mirage/resolver_mirage.ml b/src/conduit-mirage/resolver_mirage.ml
index 400a29e..a2d602f 100644
--- a/src/conduit-mirage/resolver_mirage.ml
+++ b/src/conduit-mirage/resolver_mirage.ml
@@ -28,7 +28,8 @@ module Make
     (R : Mirage_random.S)
     (T : Mirage_time.S)
     (C : Mirage_clock.MCLOCK)
-    (S : Mirage_stack.V4V6) =
+    (P : Mirage_clock.PCLOCK)
+    (S : Tcpip.Stack.V4V6) =
 struct
   include Resolver_lwt
 
@@ -92,7 +93,7 @@ struct
         (Uri.to_string uri) remote_name;
       Lwt.return (`Vchan_domain_socket (remote_name, service.Resolver.name))
 
-  module DNS = Dns_client_mirage.Make (R) (T) (C) (S)
+  module DNS = Dns_client_mirage.Make (R) (T) (C) (P) (S)
 
   let dns_stub_resolver dns service uri : Conduit.endp Lwt.t =
     let hostn = get_host uri in
@@ -110,12 +111,10 @@ struct
     | Error (`Msg err) -> `Unknown ("name resolution failed: " ^ err)
     | Ok addr -> `TCP (Ipaddr.V4 addr, port)
 
-  let register ?ns ?(ns_port = 53) s res =
+  let register ?nameservers s res =
     (* DNS stub resolver *)
-    let nameserver =
-      match ns with None -> None | Some ip -> Some (`TCP, (ip, ns_port))
-    in
-    let dns = DNS.create ?nameserver s in
+    let nameservers = Option.map (fun ns -> (`Tcp, ns)) nameservers in
+    let dns = DNS.create ?nameservers s in
     let f = dns_stub_resolver dns in
     Resolver_lwt.add_rewrite ~host:"" ~f res;
     let service = Resolver_lwt.(service res ++ static_service) in
@@ -124,9 +123,9 @@ struct
     let vchan_res = vchan_resolver ~tld:vchan_tld in
     Resolver_lwt.add_rewrite ~host:vchan_tld ~f:vchan_res res
 
-  let v ?ns ?ns_port stack =
+  let v ?nameservers stack =
     let res = Resolver_lwt.init () in
-    register ?ns ?ns_port stack res;
+    register ?nameservers stack res;
     res
 
   type t = Resolver_lwt.t
diff --git a/src/conduit-mirage/resolver_mirage.mli b/src/conduit-mirage/resolver_mirage.mli
index b309ae7..c0bfb5e 100644
--- a/src/conduit-mirage/resolver_mirage.mli
+++ b/src/conduit-mirage/resolver_mirage.mli
@@ -34,9 +34,16 @@ module Make
     (R : Mirage_random.S)
     (T : Mirage_time.S)
     (C : Mirage_clock.MCLOCK)
-    (S : Mirage_stack.V4V6) : sig
+    (P : Mirage_clock.PCLOCK)
+    (S : Tcpip.Stack.V4V6) : sig
   include S
 
-  val v : ?ns:Ipaddr.t -> ?ns_port:int -> S.t -> t
-  (** [v ?ns ?ns_port ?stack ()] TODO *)
+  val v :
+    ?nameservers:
+      [ `Plaintext of Ipaddr.t * int
+      | `Tls of Tls.Config.client * Ipaddr.t * int ]
+      list ->
+    S.t ->
+    t
+  (** [v ~nameservers stack ()] TODO *)
 end
diff --git a/tests/conduit-async/build.sh b/tests/conduit-async/build.sh
deleted file mode 100755
index 4660345..0000000
--- a/tests/conduit-async/build.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-corebuild -tag annot -pkgs conduit.async ssl_echo.native
diff --git a/tests/conduit-async/dune b/tests/conduit-async/dune
index eaaf1b9..8d09834 100644
--- a/tests/conduit-async/dune
+++ b/tests/conduit-async/dune
@@ -1,5 +1,5 @@
 (executable
- (libraries async conduit-async)
+ (libraries async core_unix.command_unix conduit-async)
  (name ssl_echo))
 
 (rule
diff --git a/tests/conduit-async/ssl_echo.ml b/tests/conduit-async/ssl_echo.ml
index fbb25ab..bff5b40 100644
--- a/tests/conduit-async/ssl_echo.ml
+++ b/tests/conduit-async/ssl_echo.ml
@@ -54,4 +54,4 @@ let () =
       +> flag "-cert-file" (optional string) ~doc:"file Certificate file"
       +> flag "-key-file" (optional string) ~doc:"File Private key file")
     start_server
-  |> Command.run
+  |> Command_unix.run
diff --git a/tests/conduit-lwt-unix/cdtest_tls.ml b/tests/conduit-lwt-unix/cdtest_tls.ml
index 122b044..e47ea11 100644
--- a/tests/conduit-lwt-unix/cdtest_tls.ml
+++ b/tests/conduit-lwt-unix/cdtest_tls.ml
@@ -49,7 +49,7 @@ let perform () =
     let client =
       `TLS (`Hostname "", `IP Ipaddr.(V6 V6.localhost), `Port port)
     in
-    Conduit_lwt_unix.(connect ~ctx:default_ctx client)
+    Conduit_lwt_unix.(connect ~ctx:(Lazy.force default_ctx) client)
     >>= fun (_flow, ic, oc) ->
     Lwt_log.notice "Connected!" >>= fun () ->
     Lwt_io.write oc "hello" >>= fun () ->