mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
ss: support no tls in policy
If there's no trust store in use, create a default vhost so everything can continue normally
This commit is contained in:
parent
43b83c333b
commit
c3a8387afd
1 changed files with 10 additions and 0 deletions
|
@ -189,6 +189,16 @@ lws_ss_policy_set(struct lws_context *context, const char *name)
|
|||
|
||||
if (!pol->trust_store) {
|
||||
pol = pol->next;
|
||||
if (!pol && !context->vhost_list) {
|
||||
/* corner case... there's no trust store used */
|
||||
i.options = context->options;
|
||||
i.vhost_name = "_ss_default";
|
||||
i.port = CONTEXT_PORT_NO_LISTEN;
|
||||
v = lws_create_vhost(context, &i);
|
||||
if (!v)
|
||||
lwsl_err("%s: failed to create vhost %s\n",
|
||||
__func__, i.vhost_name);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
v = lws_get_vhost_by_name(context, pol->trust_store->name);
|
||||
|
|
Loading…
Add table
Reference in a new issue