server: add mbedtls support

This commit is contained in:
Shuanglei Tao
2020-12-30 00:45:09 +08:00
parent cdaef3ce97
commit 6db541b2b1
3 changed files with 3 additions and 20 deletions

View File

@@ -509,8 +509,8 @@ int main(int argc, char **argv) {
if (ssl) {
info.ssl_cert_filepath = cert_path;
info.ssl_private_key_filepath = key_path;
info.ssl_ca_filepath = ca_path;
if (strlen(info.ssl_ca_filepath) > 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;