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:
Johanna Amann 2015-03-11 15:53:32 -07:00
parent 1ae97e7e62
commit 47de906612
4 changed files with 67 additions and 62 deletions

View file

@ -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 )