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
2 changes: 1 addition & 1 deletion conduit-lwt-unix.opam
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ depends: [
]
depopts: ["tls" "lwt_ssl" "launchd"]
conflicts: [
"tls" {< "0.13.0"}
"tls" {< "0.14.0"}
"ssl" {< "0.5.9"}
]
build: [
Expand Down
2 changes: 1 addition & 1 deletion src/conduit-lwt-unix/conduit_lwt_tls.dummy.mli
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module Client : sig
?src:Lwt_unix.sockaddr ->
?certificates:'a ->
authenticator:X509.authenticator ->
string ->
[ `host ] Domain_name.t ->
Lwt_unix.sockaddr ->
(Lwt_unix.file_descr * Lwt_io.input_channel * Lwt_io.output_channel) Lwt.t
end
Expand Down
2 changes: 1 addition & 1 deletion src/conduit-lwt-unix/conduit_lwt_tls.real.mli
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module Client : sig
?src:Lwt_unix.sockaddr ->
?certificates:Tls.Config.own_cert ->
authenticator:X509.authenticator ->
string ->
[ `host ] Domain_name.t ->
Lwt_unix.sockaddr ->
(Lwt_unix.file_descr * Lwt_io.input_channel * Lwt_io.output_channel) Lwt.t
end
Expand Down
9 changes: 9 additions & 0 deletions src/conduit-lwt-unix/conduit_lwt_unix.ml
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,15 @@ let connect_with_tls_native ~ctx (`Hostname hostname, `IP ip, `Port port) =
Conduit_lwt_tls.X509.private_of_pems ~cert ~priv_key
>|= fun certificate -> Some (`Single certificate))
>>= fun certificates ->
let hostname =
try Domain_name.(host_exn (of_string_exn hostname))
with Invalid_argument msg ->
let s =
Printf.sprintf "couldn't convert %s to a [`host] Domain_name.t: %s"
hostname msg
in
invalid_arg s
in
Comment thread
hannesm marked this conversation as resolved.
Conduit_lwt_tls.Client.connect ?src:ctx.src ?certificates
~authenticator:ctx.tls_authenticator hostname sa
>|= fun (fd, ic, oc) ->
Expand Down