Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message for missing SSL/TLS support #431

Merged
merged 2 commits into from
Aug 29, 2024
Merged
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
12 changes: 10 additions & 2 deletions src/conduit-lwt-unix/conduit_lwt_unix.ml
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,11 @@ let connect_with_default_tls ~ctx tls_client_config =
match !tls_library with
| OpenSSL -> connect_with_openssl ~ctx tls_client_config
| Native -> connect_with_tls_native ~ctx tls_client_config
| No_tls -> failwith "No SSL or TLS support compiled into Conduit"
| No_tls ->
failwith
"No SSL or TLS support compiled into Conduit. You must install it \
through opam with one of these commands: `opam install lwt_ssl` or \
`opam install tls-lwt`"

(** Main connection function *)

Expand Down Expand Up @@ -367,7 +371,11 @@ let serve_with_default_tls ?timeout ?stop ~ctx ~certfile ~keyfile ~pass ~port
| Native ->
serve_with_tls_native ?timeout ?stop ~ctx ~certfile ~keyfile ~pass ~port
callback
| No_tls -> failwith "No SSL or TLS support compiled into Conduit"
| No_tls ->
failwith
"No SSL or TLS support compiled into Conduit. You must install it \
through opam with one of these commands: `opam install lwt_ssl` or \
`opam install tls-lwt`"

let serve ?backlog ?timeout ?stop ~on_exn ~(ctx : ctx) ~(mode : server) callback
=
Expand Down
Loading