You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,,
I have one threaded websocket client running, having multiple url. I need to write libwebsocket based client , which will send data to 5-6 urls.
Client also need to validate server certificates .mutual bverification is expected. and each clients are having discrete certificates .
Requirement is all having discrete connection params including the tls certificattes. i have seen in context info object is having placed holder for the certifiacte path. how will i pass that information in case of multiple certificates for each connection that are sharing same lws_context.?
I have seen in some recommendation using lws_host , stating that to use vhost functionality. any example to refer that ?
The text was updated successfully, but these errors were encountered:
Just to be clear, lws is strictly single threaded, you can't randomly throw threads on it. You can use lws in its own thread, the same context, loop and thread for all the client connections, and then interact with other threads carefully, but all but lws_cancel_service() apis in lws must be called from the event loop thread.
There is no example that does exactly what you want because there's no simple way to do mutual auth, ie, no easy way to set up long term certs and a server and maintain it just in case someone wanting to do mutual auth turns up years later.
Grep for LWS_SERVER_OPTION_EXPLICIT_VHOSTS in the examples to see how to create multiple vhosts.
The minimum for mutual auth on the client side should look like test-apps/test-client.c line 744.
#if defined(LWS_WITH_TLS)
if (use_ssl) {
/*
* If the server wants us to present a valid SSL client certificate
* then we can set it up here.
*/
if (cert_path[0])
info.client_ssl_cert_filepath = cert_path;
if (key_path[0])
info.client_ssl_private_key_filepath = key_path;
Hello,,
I have one threaded websocket client running, having multiple url. I need to write libwebsocket based client , which will send data to 5-6 urls.
Client also need to validate server certificates .mutual bverification is expected. and each clients are having discrete certificates .
Requirement is all having discrete connection params including the tls certificattes. i have seen in context info object is having placed holder for the certifiacte path. how will i pass that information in case of multiple certificates for each connection that are sharing same lws_context.?
I have seen in some recommendation using lws_host , stating that to use vhost functionality. any example to refer that ?
The text was updated successfully, but these errors were encountered: