$proxy->clientflags("-no_tls1_3 -status");
$proxy->start();
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
- checkhandshake::DEFAULT_EXTENSIONS
- | checkhandshake::STATUS_REQUEST_CLI_EXTENSION,
- "status_request handshake test (client)");
+ checkhandshake::DEFAULT_EXTENSIONS
+ | checkhandshake::STATUS_REQUEST_CLI_EXTENSION,
+ "status_request handshake test (client)");
#Test 4: A status_request handshake (server support only)
$proxy->clear();
$proxy->start();
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
checkhandshake::DEFAULT_EXTENSIONS,
- "status_request handshake test (server)");
+ "status_request handshake test (server)");
#Test 5: A status_request handshake (client and server)
$proxy->clear();
.srctop_file("test", "recipes", "ocsp-response.der"));
$proxy->start();
checkhandshake($proxy, checkhandshake::OCSP_HANDSHAKE,
- checkhandshake::DEFAULT_EXTENSIONS
- | checkhandshake::STATUS_REQUEST_CLI_EXTENSION
- | checkhandshake::STATUS_REQUEST_SRV_EXTENSION,
- "status_request handshake test");
+ checkhandshake::DEFAULT_EXTENSIONS
+ | checkhandshake::STATUS_REQUEST_CLI_EXTENSION
+ | checkhandshake::STATUS_REQUEST_SRV_EXTENSION,
+ "status_request handshake test");
#Test 6: A client auth handshake
$proxy->clear();
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
checkhandshake::DEFAULT_EXTENSIONS
| checkhandshake::SERVER_NAME_CLI_EXTENSION,
- "Server name handshake test (client)");
+ "Server name handshake test (client)");
#Test 9: Server name handshake (server support only)
$proxy->clear();
$proxy->start();
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
checkhandshake::DEFAULT_EXTENSIONS,
- "Server name handshake test (server)");
+ "Server name handshake test (server)");
#Test 10: Server name handshake (client and server)
$proxy->clear();
$proxy->serverflags("-servername testhost");
$proxy->start();
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
- checkhandshake::DEFAULT_EXTENSIONS
- | checkhandshake::SERVER_NAME_CLI_EXTENSION
- | checkhandshake::SERVER_NAME_SRV_EXTENSION,
- "Server name handshake test");
+ checkhandshake::DEFAULT_EXTENSIONS
+ | checkhandshake::SERVER_NAME_CLI_EXTENSION
+ | checkhandshake::SERVER_NAME_SRV_EXTENSION,
+ "Server name handshake test");
#Test 11: ALPN handshake (client request only)
$proxy->clear();
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
checkhandshake::DEFAULT_EXTENSIONS
| checkhandshake::ALPN_CLI_EXTENSION,
- "ALPN handshake test (client)");
+ "ALPN handshake test (client)");
#Test 12: ALPN handshake (server support only)
$proxy->clear();
$proxy->start();
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
checkhandshake::DEFAULT_EXTENSIONS,
- "ALPN handshake test (server)");
+ "ALPN handshake test (server)");
#Test 13: ALPN handshake (client and server)
$proxy->clear();
$proxy->serverflags("-alpn test");
$proxy->start();
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
- checkhandshake::DEFAULT_EXTENSIONS
- | checkhandshake::ALPN_CLI_EXTENSION
- | checkhandshake::ALPN_SRV_EXTENSION,
- "ALPN handshake test");
+ checkhandshake::DEFAULT_EXTENSIONS
+ | checkhandshake::ALPN_CLI_EXTENSION
+ | checkhandshake::ALPN_SRV_EXTENSION,
+ "ALPN handshake test");
#Test 14: SCT handshake (client request only)
$proxy->clear();
.srctop_file("test", "recipes", "ocsp-response.der"));
$proxy->start();
checkhandshake($proxy, checkhandshake::OCSP_HANDSHAKE,
- checkhandshake::DEFAULT_EXTENSIONS
- | checkhandshake::SCT_CLI_EXTENSION
- | checkhandshake::STATUS_REQUEST_CLI_EXTENSION
- | checkhandshake::STATUS_REQUEST_SRV_EXTENSION,
- "SCT handshake test (client)");
+ checkhandshake::DEFAULT_EXTENSIONS
+ | checkhandshake::SCT_CLI_EXTENSION
+ | checkhandshake::STATUS_REQUEST_CLI_EXTENSION
+ | checkhandshake::STATUS_REQUEST_SRV_EXTENSION,
+ "SCT handshake test (client)");
#Test 15: SCT handshake (server support only)
$proxy->clear();
.srctop_file("test", "recipes", "ocsp-response.der"));
$proxy->start();
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
- checkhandshake::DEFAULT_EXTENSIONS,
- "SCT handshake test (server)");
+ checkhandshake::DEFAULT_EXTENSIONS,
+ "SCT handshake test (server)");
#Test 16: SCT handshake (client and server)
#There is no built-in server side support for this so we are actually also
." -serverinfo ".srctop_file("test", "serverinfo.pem"));
$proxy->start();
checkhandshake($proxy, checkhandshake::OCSP_HANDSHAKE,
- checkhandshake::DEFAULT_EXTENSIONS
- | checkhandshake::SCT_CLI_EXTENSION
- | checkhandshake::SCT_SRV_EXTENSION
- | checkhandshake::STATUS_REQUEST_CLI_EXTENSION
- | checkhandshake::STATUS_REQUEST_SRV_EXTENSION,
- "SCT handshake test");
+ checkhandshake::DEFAULT_EXTENSIONS
+ | checkhandshake::SCT_CLI_EXTENSION
+ | checkhandshake::SCT_SRV_EXTENSION
+ | checkhandshake::STATUS_REQUEST_CLI_EXTENSION
+ | checkhandshake::STATUS_REQUEST_SRV_EXTENSION,
+ "SCT handshake test");
#Test 17: NPN handshake (client request only)
$proxy->serverflags("-nextprotoneg test");
$proxy->start();
checkhandshake($proxy, checkhandshake::NPN_HANDSHAKE,
- checkhandshake::DEFAULT_EXTENSIONS
- | checkhandshake::NPN_CLI_EXTENSION
- | checkhandshake::NPN_SRV_EXTENSION,
- "NPN handshake test");
+ checkhandshake::DEFAULT_EXTENSIONS
+ | checkhandshake::NPN_CLI_EXTENSION
+ | checkhandshake::NPN_SRV_EXTENSION,
+ "NPN handshake test");
#Test 20: SRP extension
#Note: We are not actually going to perform an SRP handshake (TLSProxy does not
$proxy->clientflags("-no_tls1_3 -srpuser user -srppass pass:pass");
$proxy->start();
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
- checkhandshake::DEFAULT_EXTENSIONS
- | checkhandshake::SRP_CLI_EXTENSION,
- "SRP extension test");
+ checkhandshake::DEFAULT_EXTENSIONS
+ | checkhandshake::SRP_CLI_EXTENSION,
+ "SRP extension test");
$proxy->clientflags("-status");
$proxy->start();
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
- checkhandshake::DEFAULT_EXTENSIONS
- | checkhandshake::STATUS_REQUEST_CLI_EXTENSION,
- "status_request handshake test (client)");
+ checkhandshake::DEFAULT_EXTENSIONS
+ | checkhandshake::STATUS_REQUEST_CLI_EXTENSION,
+ "status_request handshake test (client)");
#Test 4: A status_request handshake (server support only)
$proxy->clear();
$proxy->start();
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
checkhandshake::DEFAULT_EXTENSIONS,
- "status_request handshake test (server)");
+ "status_request handshake test (server)");
#Test 5: A status_request handshake (client and server)
#TODO(TLS1.3): TLS1.3 doesn't actually have CertificateStatus messages. This is
.srctop_file("test", "recipes", "ocsp-response.der"));
$proxy->start();
checkhandshake($proxy, checkhandshake::OCSP_HANDSHAKE,
- checkhandshake::DEFAULT_EXTENSIONS
- | checkhandshake::STATUS_REQUEST_CLI_EXTENSION
- | checkhandshake::STATUS_REQUEST_SRV_EXTENSION,
- "status_request handshake test");
+ checkhandshake::DEFAULT_EXTENSIONS
+ | checkhandshake::STATUS_REQUEST_CLI_EXTENSION
+ | checkhandshake::STATUS_REQUEST_SRV_EXTENSION,
+ "status_request handshake test");
#Test 6: A client auth handshake
$proxy->clear();
$proxy->start();
checkhandshake($proxy, checkhandshake::CLIENT_AUTH_HANDSHAKE,
checkhandshake::DEFAULT_EXTENSIONS,
- "Client auth handshake test");
+ "Client auth handshake test");
#Test 7: Server name handshake (client request only)
$proxy->clear();
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
checkhandshake::DEFAULT_EXTENSIONS
| checkhandshake::SERVER_NAME_CLI_EXTENSION,
- "Server name handshake test (client)");
+ "Server name handshake test (client)");
#Test 8: Server name handshake (server support only)
$proxy->clear();
$proxy->start();
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
checkhandshake::DEFAULT_EXTENSIONS,
- "Server name handshake test (server)");
+ "Server name handshake test (server)");
#Test 9: Server name handshake (client and server)
$proxy->clear();
$proxy->serverflags("-servername testhost");
$proxy->start();
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
- checkhandshake::DEFAULT_EXTENSIONS
- | checkhandshake::SERVER_NAME_CLI_EXTENSION
- | checkhandshake::SERVER_NAME_SRV_EXTENSION,
- "Server name handshake test");
+ checkhandshake::DEFAULT_EXTENSIONS
+ | checkhandshake::SERVER_NAME_CLI_EXTENSION
+ | checkhandshake::SERVER_NAME_SRV_EXTENSION,
+ "Server name handshake test");
#Test 10: ALPN handshake (client request only)
$proxy->clear();
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
checkhandshake::DEFAULT_EXTENSIONS
| checkhandshake::ALPN_CLI_EXTENSION,
- "ALPN handshake test (client)");
+ "ALPN handshake test (client)");
#Test 11: ALPN handshake (server support only)
$proxy->clear();
$proxy->start();
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
checkhandshake::DEFAULT_EXTENSIONS,
- "ALPN handshake test (server)");
+ "ALPN handshake test (server)");
#Test 12: ALPN handshake (client and server)
$proxy->clear();
$proxy->serverflags("-alpn test");
$proxy->start();
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
- checkhandshake::DEFAULT_EXTENSIONS
- | checkhandshake::ALPN_CLI_EXTENSION
- | checkhandshake::ALPN_SRV_EXTENSION,
- "ALPN handshake test");
+ checkhandshake::DEFAULT_EXTENSIONS
+ | checkhandshake::ALPN_CLI_EXTENSION
+ | checkhandshake::ALPN_SRV_EXTENSION,
+ "ALPN handshake test");
#Test 13: SCT handshake (client request only)
#TODO(TLS1.3): This only checks that the client side extension appears. The
.srctop_file("test", "recipes", "ocsp-response.der"));
$proxy->start();
checkhandshake($proxy, checkhandshake::OCSP_HANDSHAKE,
- checkhandshake::DEFAULT_EXTENSIONS
- | checkhandshake::SCT_CLI_EXTENSION
- | checkhandshake::STATUS_REQUEST_CLI_EXTENSION
- | checkhandshake::STATUS_REQUEST_SRV_EXTENSION,
- "SCT handshake test");
+ checkhandshake::DEFAULT_EXTENSIONS
+ | checkhandshake::SCT_CLI_EXTENSION
+ | checkhandshake::STATUS_REQUEST_CLI_EXTENSION
+ | checkhandshake::STATUS_REQUEST_SRV_EXTENSION,
+ "SCT handshake test");
$extensions .= pack("n", length($extdata));
$extensions .= $extdata;
if ($key == TLSProxy::Message::EXT_DUPLICATE_EXTENSION) {
- $extensions .= pack("n", $key);
- $extensions .= pack("n", length($extdata));
- $extensions .= $extdata;
+ $extensions .= pack("n", $key);
+ $extensions .= pack("n", length($extdata));
+ $extensions .= $extdata;
}
}
{
my $self = shift;
if (@_) {
- $self->{extension_data} = shift;
+ $self->{extension_data} = shift;
}
return $self->{extension_data};
}
{
my $self = shift;
if (@_) {
- $self->{proxy_addr} = shift;
+ $self->{proxy_addr} = shift;
}
return $self->{proxy_addr};
}
{
my $self = shift;
if (@_) {
- $self->{proxy_port} = shift;
+ $self->{proxy_port} = shift;
}
return $self->{proxy_port};
}
{
my $self = shift;
if (@_) {
- $self->{server_addr} = shift;
+ $self->{server_addr} = shift;
}
return $self->{server_addr};
}
{
my $self = shift;
if (@_) {
- $self->{server_port} = shift;
+ $self->{server_port} = shift;
}
return $self->{server_port};
}
{
my $self = shift;
if (@_) {
- $self->{filter} = shift;
+ $self->{filter} = shift;
}
return $self->{filter};
}
{
my $self = shift;
if (@_) {
- $self->{cipherc} = shift;
+ $self->{cipherc} = shift;
}
return $self->{cipherc};
}
{
my $self = shift;
if (@_) {
- $self->{ciphers} = shift;
+ $self->{ciphers} = shift;
}
return $self->{ciphers};
}
{
my $self = shift;
if (@_) {
- $self->{serverflags} = shift;
+ $self->{serverflags} = shift;
}
return $self->{serverflags};
}
{
my $self = shift;
if (@_) {
- $self->{clientflags} = shift;
+ $self->{clientflags} = shift;
}
return $self->{clientflags};
}
{
my $self = shift;
if (@_) {
- $self->{serverconnects} = shift;
+ $self->{serverconnects} = shift;
}
return $self->{serverconnects};
}
{
my $self = shift;
if (@_) {
- $self->{serverpid} = shift;
+ $self->{serverpid} = shift;
}
return $self->{serverpid};
}
{
my $class = shift;
if (@_) {
- $is_tls13 = shift;
+ $is_tls13 = shift;
}
return $is_tls13;
}
{
my $self = shift;
if (@_) {
- $self->{reneg} = shift;
+ $self->{reneg} = shift;
}
return $self->{reneg};
}