* The extension context is defined by a series of flags which specify which
* messages the extension is relevant to. These flags also specify whether the
* extension is relevant to a paricular protocol or protocol version.
- *
+ *
* TODO(TLS1.3): Make sure we have a test to check the consistency of these
*/
static const EXTENSION_DEFINITION ext_defs[] = {
/*
* We already initialised the custom extensions during ClientHello
* parsing.
- *
+ *
* TODO(TLS1.3): We're going to need a new custom extension mechanism
* for TLS1.3, so that custom extensions can specify which of the
* multiple message they wish to add themselves to.
{
if (s->srtp_profile == NULL)
return 1;
-
+
if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_use_srtp)
|| !WPACKET_start_sub_packet_u16(pkt)
|| !WPACKET_put_bytes_u16(pkt, 2)
checkhandshake($proxy, recipes::checkhandshake::DEFAULT_HANDSHAKE,
recipes::checkhandshake::DEFAULT_EXTENSIONS,
"ALPN handshake test (server)");
-
+
#Test 13: ALPN handshake (client and server)
$proxy->clear();
$proxy->clientflags("-no_tls1_3 -alpn test");
checkhandshake($proxy, recipes::checkhandshake::DEFAULT_HANDSHAKE,
recipes::checkhandshake::DEFAULT_EXTENSIONS,
"NPN handshake test (server)");
-
+
#Test 19: NPN handshake (client and server)
$proxy->clear();
$proxy->clientflags("-no_tls1_3 -nextprotoneg test");
checkhandshake($proxy, recipes::checkhandshake::DEFAULT_HANDSHAKE,
recipes::checkhandshake::DEFAULT_EXTENSIONS,
"ALPN handshake test (server)");
-
+
#Test 12: ALPN handshake (client and server)
$proxy->clear();
$proxy->clientflags("-alpn test");
$records,
$startoffset,
$message_frag_lens) = @_;
-
+
my $self = $class->SUPER::new(
$server,
TLSProxy::Message::MT_ENCRYPTED_EXTENSIONS,
my $extension_data;
if ($extensions_len != 0) {
$extension_data = substr($self->data, 2);
-
+
if (length($extension_data) != $extensions_len) {
die "Invalid extension length\n";
}
$server_version = TLSProxy::Record::VERS_TLS_1_3;
TLSProxy::Proxy->is_tls13(1);
}
-
+
my $random = substr($self->data, $ptr, 32);
$ptr += 32;
my $session_id_len = 0;