You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
486 B

  1. --- a/src/server.c
  2. +++ b/src/server.c
  3. @@ -509,9 +509,10 @@ int main(int argc, char **argv) {
  4. if (ssl) {
  5. info.ssl_cert_filepath = cert_path;
  6. info.ssl_private_key_filepath = key_path;
  7. - if (strlen(ca_path) > 0)
  8. + if (strlen(ca_path) > 0) {
  9. info.ssl_ca_filepath = ca_path;
  10. info.options |= LWS_SERVER_OPTION_REQUIRE_VALID_OPENSSL_CLIENT_CERT;
  11. + }
  12. #if LWS_LIBRARY_VERSION_MAJOR >= 2
  13. info.options |= LWS_SERVER_OPTION_REDIRECT_HTTP_TO_HTTPS;
  14. #endif