mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 01:58:20 +00:00
Make handshake analyzer flow-based. This means we can feed data to it in
chunks, which makes dealing with fragmentation a little bit more convenient.
This commit is contained in:
parent
1ae97e7e62
commit
47de906612
4 changed files with 67 additions and 62 deletions
|
@ -63,10 +63,11 @@ void SSL_Analyzer::DeliverStream(int len, const u_char* data, bool orig)
|
|||
|
||||
void SSL_Analyzer::SendHandshake(uint8 msg_type, uint32 length, const u_char* begin, const u_char* end, bool orig)
|
||||
{
|
||||
handshake_interp->set_msg_type(msg_type);
|
||||
handshake_interp->set_msg_length(length);
|
||||
try
|
||||
{
|
||||
handshake_interp->NewData(orig, (const unsigned char*) &msg_type, (const unsigned char*) &msg_type + 1);
|
||||
uint32 host_length = htonl(length);
|
||||
handshake_interp->NewData(orig, (const unsigned char*) &host_length, (const unsigned char*) &host_length + sizeof(host_length));
|
||||
handshake_interp->NewData(orig, begin, end);
|
||||
}
|
||||
catch ( const binpac::Exception& e )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue