From 0b146b750c5c1e88a1bf52fe9e61e1256017c82e Mon Sep 17 00:00:00 2001 From: Shuanglei Tao Date: Tue, 9 Mar 2021 22:23:28 +0800 Subject: [PATCH] server: fix ssl ca option init --- src/server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index 23e6099..f5a3e68 100644 --- a/src/server.c +++ b/src/server.c @@ -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 -- 2.43.4