mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
LibWebSocket: Support specifying root certificate path
This commit is contained in:
committed by
Ali Mohammad Pur
parent
b8f609099a
commit
24d3da64e5
Notes:
github-actions[bot]
2025-02-17 18:53:40 +00:00
Author: https://github.com/devgianlu Commit: https://github.com/LadybirdBrowser/ladybird/commit/24d3da64e5f Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3571 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/alimpfard ✅
@@ -45,8 +45,11 @@ void WebSocketImplSerenity::connect(ConnectionInfo const& connection_info)
|
||||
auto socket_result = [&]() -> ErrorOr<NonnullOwnPtr<Core::BufferedSocketBase>> {
|
||||
auto host = connection_info.url().serialized_host().to_byte_string();
|
||||
if (connection_info.is_secure()) {
|
||||
TLS::Options options;
|
||||
options.set_root_certificates_path(connection_info.root_certificates_path());
|
||||
|
||||
return TRY(Core::BufferedSocket<TLS::TLSv12>::create(
|
||||
TRY(TLS::TLSv12::connect(host, connection_info.url().port_or_default()))));
|
||||
TRY(TLS::TLSv12::connect(host, connection_info.url().port_or_default(), move(options)))));
|
||||
}
|
||||
|
||||
return TRY(Core::BufferedTCPSocket::create(
|
||||
|
||||
Reference in New Issue
Block a user