mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibWebSocket: Support specifying root certificate path
This commit is contained in:
committed by
Ali Mohammad Pur
parent
b8f609099a
commit
24d3da64e5
@@ -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