Lines Matching refs:record

85 #Test 5: Inject an SSLv2 style record format for a TLSv1.2 ClientHello
93 #Test 6: Inject an SSLv2 style record format for an SSLv2 ClientHello. We don't
111 #Test 8: Fragment a TLSv1.2 ClientHello across a TLS1.2 record; an SSLv2
112 # record; and another TLS1.2 record. This isn't allowed so should fail
120 # fail because an SSLv2 ClientHello must be the first record.
127 #Unrecognised record type tests
129 #Test 10: Sending an unrecognised record type in TLS1.2 should fail
135 ok($fatal_alert, "Unrecognised record type in TLS1.2");
140 #Test 11: Sending an unrecognised record type in TLS1.1 should fail
145 ok($fatal_alert, "Unrecognised record type in TLS1.1");
148 #Test 12: Sending a different record version in TLS1.2 should fail
154 ok($fatal_alert, "Changed record version in TLS1.2");
160 #Test 13: Sending a different record version in TLS1.3 should fail
164 ok(TLSProxy::Message->fail(), "Changed record version in TLS1.3");
166 #Test 14: Sending an unrecognised record type in TLS1.3 should fail
171 ok($fatal_alert, "Unrecognised record type in TLS1.3");
173 #Test 15: Sending an outer record type other than app data once encrypted
179 ok($fatal_alert, "Wrong outer record type in TLS1.3");
189 #Test 16: Sending a ServerHello which doesn't end on a record boundary
198 #Test 17: Sending a Finished which doesn't end on a record boundary
206 #Test 18: Sending a KeyUpdate which doesn't end on a record boundary
215 # should fail. Strictly speaking this is not a record boundary test
224 # is not a record boundary test but we use the same filter.
244 my $record = TLSProxy::Record->new(
255 push @{$records}, $record;
272 #my $record = TLSProxy::Record->new(
282 #push @{$proxy->record_list}, $record;
284 # Now add the alert level (Fatal) as a separate record
286 my $record = TLSProxy::Record->new(
297 push @{$records}, $record;
299 # And finally the description (Unexpected message) in a third record
301 $record = TLSProxy::Record->new(
312 push @{$records}, $record;
319 my $record;
333 $record = TLSProxy::Record->new(
345 push @{$proxy->record_list}, $record;
372 $record = TLSProxy::Record->new(
384 push @{$proxy->record_list}, $record;
403 # Split this into 3: A TLS record; a SSLv2 record and a TLS record.
404 # We deliberately split the second record prior to the Challenge/Random
406 # record look like an SSLv2 ClientHello
412 $record = TLSProxy::Record->new(
423 push @{$proxy->record_list}, $record;
432 $record = TLSProxy::Record->new(
443 push @{$proxy->record_list}, $record;
446 $record = TLSProxy::Record->new(
457 push @{$proxy->record_list}, $record;
468 # We'll change a record after the initial version neg has taken place
477 my $record = TLSProxy::Record->new(
489 #Find ServerHello record and insert after that
496 splice @{$proxy->record_list}, $i, 0, $record;
522 # We'll change a record after the initial version neg has taken place
528 # Find CCS record and change record after that
530 foreach my $record (@{$records}) {
531 last if $record->content_type == TLSProxy::Record::RT_CCS;
554 foreach my $record (@{$records}) {
555 if ($record->content_type == TLSProxy::Record::RT_HANDSHAKE) {
556 $record->{sent} = 1; # pretend it's sent already
568 #Delete the old ServerHello record
578 #Add a KeyUpdate message onto the end of the Finished record
589 #Update the record
596 #KeyUpdates must end on a record boundary
598 my $record = TLSProxy::Record->new(
610 #Add two KeyUpdate messages into a single record
621 $record->data($data);
622 $record->len(length $data);
623 push @{$records}, $record;
628 my $record = TLSProxy::Record->new(
640 #Add a partial KeyUpdate message into the record
647 $record->data($data);
648 $record->len(length $data);
649 push @{$records}, $record;
652 #Now add an app data record
653 $record = TLSProxy::Record->new(
665 #Add an empty app data record (just content type and tag)
668 $record->data($data);
669 $record->len(length $data);
670 push @{$records}, $record;
674 $record = TLSProxy::Record->new(
686 #Add the last 4 bytes of the KeyUpdate record
694 $record->data($data);
695 $record->len(length $data);
696 push @{$records}, $record;