LibWebSocket: Support specifying root certificate path

This commit is contained in:
devgianlu 2025-02-14 12:24:03 +01:00 committed by Ali Mohammad Pur
commit 24d3da64e5
Notes: github-actions[bot] 2025-02-17 18:53:40 +00:00
4 changed files with 22 additions and 4 deletions

View file

@ -656,6 +656,9 @@ void ConnectionFromClient::websocket_connect(i64 websocket_id, URL::URL const& u
connection_info.set_extensions(extensions);
connection_info.set_headers(additional_request_headers);
if (!g_default_certificate_path.is_empty())
connection_info.set_root_certificates_path(g_default_certificate_path);
auto connection = WebSocket::WebSocket::create(move(connection_info));
connection->on_open = [this, websocket_id]() {
async_websocket_connected(websocket_id);