mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
LibTLS: Add (basic) support for sending client certificates
This commit is contained in:
parent
e54a5b7fb8
commit
9d3ffa096a
2 changed files with 57 additions and 4 deletions
|
@ -439,7 +439,9 @@ ssize_t TLSv12::handle_payload(const ByteBuffer& vbuffer)
|
|||
} else {
|
||||
// we do not support "certificate request"
|
||||
dbg() << "certificate request";
|
||||
ASSERT_NOT_REACHED();
|
||||
if (on_tls_certificate_request)
|
||||
on_tls_certificate_request(*this);
|
||||
m_context.client_verified = VerificationNeeded;
|
||||
}
|
||||
break;
|
||||
case ServerHelloDone:
|
||||
|
@ -590,8 +592,10 @@ ssize_t TLSv12::handle_payload(const ByteBuffer& vbuffer)
|
|||
// nothing to write
|
||||
break;
|
||||
case WritePacketStage::ClientHandshake:
|
||||
// Note: currently not used
|
||||
if (m_context.client_verified == VerificationNeeded) {
|
||||
#ifdef TLS_DEBUG
|
||||
dbg() << "> Client Certificate";
|
||||
#endif
|
||||
auto packet = build_certificate();
|
||||
write_packet(packet);
|
||||
m_context.client_verified = Verified;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue