Open jbmercha opened 7 years ago
@jbmercha I am also trying to fix a similar problem. Have you managed to find a way out of this issue?
I am using websocket_client_config::set_ssl_context_callback
to configure the boost::asio::ssl::context
Thanks for your reply. But isn't the websocket part abstracted from the signalr library user? What I mean is when you call the hub_connection.start
, everything happens internally in the signalr library including the WSS connection request.
So could you please tell me where you had set up the websocket_client_config
with the ssl context callback?
Before calling hub_connection.start
, I call hub_connection.set_client_config
. That config has get/set_websocket_client_config
which is where I configure the ssl context callback.
Although it doesn't add client certs to the config, there's an example of using the same SSL context callback for both HTTPS and Secure WebSocket clients here: https://github.com/sony/nmos-cpp/blob/master/Development/nmos/client_utils.cpp#L27-L79
I am using the SingalR C++ client (https://github.com/aspnet/SignalR-Client-Cpp) which uses cpprestsdk and would like to use Client Certificates with the TLS connection for both http and websocket connections. For http, I am able to use http_client_config::set_nativehandle_options as described in #199 but I see no equivalent in websocket_client_config.
Could a client certificate path be added to the websocket_client_config, to be used for the ssl::context's use_certificate_file and use_private_key_file? Or exposing the ssl context in a callback (if it is okay to put boost in the interface)?