mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
ss: policy: reject lack of server tls cert when tls used
https://github.com/warmcat/libwebsockets/issues/2686
This commit is contained in:
parent
c28b390e77
commit
4d7175ddd8
1 changed files with 4 additions and 0 deletions
|
@ -1365,6 +1365,10 @@ lws_ss_create(struct lws_context *context, int tsi, const lws_ss_info_t *ssi,
|
||||||
|
|
||||||
#if defined(LWS_WITH_TLS)
|
#if defined(LWS_WITH_TLS)
|
||||||
if (h->policy->flags & LWSSSPOLF_TLS) {
|
if (h->policy->flags & LWSSSPOLF_TLS) {
|
||||||
|
if (!h->policy->trust.server.cert) {
|
||||||
|
lwsl_ss_err(h, "Policy lacks tls cert");
|
||||||
|
goto fail_creation;
|
||||||
|
}
|
||||||
i.options |= LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT;
|
i.options |= LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT;
|
||||||
i.server_ssl_cert_mem =
|
i.server_ssl_cert_mem =
|
||||||
h->policy->trust.server.cert->ca_der;
|
h->policy->trust.server.cert->ca_der;
|
||||||
|
|
Loading…
Add table
Reference in a new issue