Skip to content

Commit

Permalink
server: fix ssl ca option init
Browse files Browse the repository at this point in the history
  • Loading branch information
tsl0922 committed Mar 9, 2021
1 parent 3a0aa74 commit 0b146b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server.c
Expand Up @@ -511,9 +511,10 @@ int main(int argc, char **argv) {
if (ssl) {
info.ssl_cert_filepath = cert_path;
info.ssl_private_key_filepath = key_path;
if (strlen(ca_path) > 0)
if (strlen(ca_path) > 0) {
info.ssl_ca_filepath = ca_path;
info.options |= LWS_SERVER_OPTION_REQUIRE_VALID_OPENSSL_CLIENT_CERT;
}
#if LWS_LIBRARY_VERSION_MAJOR >= 2
info.options |= LWS_SERVER_OPTION_REDIRECT_HTTP_TO_HTTPS;
#endif
Expand Down

0 comments on commit 0b146b7

Please sign in to comment.