LibTLS: Switch to Hash::Manager for hashing and add SHA1

Now we can talk to google.com
This commit is contained in:
AnotherTest 2020-04-25 05:07:24 +04:30 committed by Andreas Kling
parent 43a49f5fff
commit bb46e5f608
Notes: sideshowbarker 2024-07-19 07:04:21 +09:00
6 changed files with 157 additions and 95 deletions

View file

@ -162,13 +162,11 @@ void HttpsJob::on_socket_connected()
return finish_up();
return deferred_invoke([this](auto&) { did_fail(Core::NetworkJob::Error::ProtocolFailed); });
}
dbg() << "Read payload, " << payload.size() << " bytes";
m_received_buffers.append(payload);
m_received_size += payload.size();
auto content_length_header = m_headers.get("Content-Length");
if (content_length_header.has_value()) {
dbg() << "content length is " << content_length_header.value() << ", we have " << m_received_size;
bool ok;
if (m_received_size >= content_length_header.value().to_uint(ok) && ok)
finish_up();