LibTLS: Replace TLSv12 implementation with OpenSSL

This commit is contained in:
devgianlu 2025-02-14 09:49:33 +01:00 committed by Ali Mohammad Pur
commit 7a38a3e994
Notes: github-actions[bot] 2025-02-17 18:53:51 +00:00
15 changed files with 182 additions and 4709 deletions

View file

@ -45,13 +45,8 @@ 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_alert_handler([this](auto) {
on_connection_error();
});
return TRY(Core::BufferedSocket<TLS::TLSv12>::create(
TRY(TLS::TLSv12::connect(host, connection_info.url().port_or_default(), move(options)))));
TRY(TLS::TLSv12::connect(host, connection_info.url().port_or_default()))));
}
return TRY(Core::BufferedTCPSocket::create(
@ -66,6 +61,7 @@ void WebSocketImplSerenity::connect(ConnectionInfo const& connection_info)
}
m_socket = socket_result.release_value();
MUST(m_socket->set_blocking(false));
m_socket->on_ready_to_read = [this] {
on_ready_to_read();