mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibTLS: Replace TLSv12 implementation with OpenSSL
This commit is contained in:
committed by
Ali Mohammad Pur
parent
d6e9d2cdbb
commit
7a38a3e994
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user