Skip to content

Commit

Permalink
Merge pull request #431 from filipeom/improve-no_tls-error-message
Browse files Browse the repository at this point in the history
Improve error message for missing SSL/TLS support
  • Loading branch information
hannesm committed Aug 29, 2024
2 parents 18b8491 + ed9bd98 commit a65b694
Showing 1 changed file with 10 additions and 2 deletions.
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

0 comments on commit a65b694

Please sign in to comment.