test server: only init ssl when --ssl in use
authorAndy Green <andy@warmcat.com>
Sat, 8 Jul 2017 08:02:18 +0000 (16:02 +0800)
committerAndy Green <andy@warmcat.com>
Sat, 8 Jul 2017 08:03:39 +0000 (16:03 +0800)
test-server/test-server.c

index f4c4bc6..5656928 100644 (file)
@@ -266,6 +266,7 @@ int main(int argc, char **argv)
                        break;
                case 's':
                        use_ssl = 1;
+                       opts |= LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT;
                        break;
                case 'a':
                        opts |= LWS_SERVER_OPTION_ALLOW_NON_SSL_ON_SSL_PORT;
@@ -400,7 +401,7 @@ int main(int argc, char **argv)
        info.gid = gid;
        info.uid = uid;
        info.max_http_header_pool = 16;
-       info.options = opts | LWS_SERVER_OPTION_VALIDATE_UTF8 | LWS_SERVER_OPTION_EXPLICIT_VHOSTS | LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT;
+       info.options = opts | LWS_SERVER_OPTION_VALIDATE_UTF8 | LWS_SERVER_OPTION_EXPLICIT_VHOSTS;
        info.extensions = exts;
        info.timeout_secs = 5;
        info.ssl_cipher_list = "ECDHE-ECDSA-AES256-GCM-SHA384:"