1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

openssl: allow custom SSL_CTX with GLOBAL_INIT unset

This commit is contained in:
Andy Green 2024-09-23 13:10:28 +01:00
parent 8c8a2a5be3
commit 154bf55441
2 changed files with 6 additions and 5 deletions

View file

@ -97,8 +97,9 @@ lws_context_init_ssl_library(struct lws_context *cx,
#endif
#endif
if (!lws_check_opt(info->options, LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT)) {
lwsl_cx_info(cx, " SSL disabled: no "
"LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT");
if (!info->provided_client_ssl_ctx)
lwsl_cx_info(cx, " SSL disabled: no "
"LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT");
return 0;
}

View file

@ -138,9 +138,6 @@ int lws_context_init_client_ssl(const struct lws_context_creation_info *info,
if (info->client_ssl_ca_filepath)
ca_filepath = info->client_ssl_ca_filepath;
if (!lws_check_opt(info->options, LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT))
return 0;
if (vhost->tls.ssl_client_ctx)
return 0;
@ -155,6 +152,9 @@ int lws_context_init_client_ssl(const struct lws_context_creation_info *info,
}
#endif
if (!lws_check_opt(info->options, LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT))
return 0;
if (lws_tls_client_create_vhost_context(vhost, info, cipher_list,
ca_filepath,
info->client_ssl_ca_mem,