Commit b02b5743 authored by Matt Caswell's avatar Matt Caswell
Browse files

Skip the TLSProxy tests if environmental problems are an issue



On some platforms we can't startup the TLSProxy due to environmental
problems (e.g. network set up on the build machine). These aren't OpenSSL
problems so we shouldn't treat them as test failures. Just visibly
indicate that we are skipping the test.

We only skip the first time we attempt to start up the proxy. If that works
then everything else should do...if not we should probably investigate and
so report as a failure.

This also removes test_networking...there is a danger that this turns into
a test of user's environmental set up rather than OpenSSL.

Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
parent b84e1226
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -37,12 +37,11 @@ my $proxy = TLSProxy::Proxy->new(
    (!$ENV{HARNESS_ACTIVE} || $ENV{HARNESS_VERBOSE})
);

plan tests => 1;

#Test 1: Sending a status_request extension in both ClientHello and ServerHello
#but then omitting the CertificateStatus message is valid
#Test 1: Sending a status_request extension in both ClientHello and
#ServerHello but then omitting the CertificateStatus message is valid
$proxy->clientflags("-status");
$proxy->start();
$proxy->start() or plan skip_all => "Unable to start up Proxy for tests";
plan tests => 1;
ok(TLSProxy::Message->success, "Missing CertificateStatus message");

sub certstatus_filter
+2 −4
Original line number Diff line number Diff line
@@ -34,10 +34,9 @@ my $proxy = TLSProxy::Proxy->new(
    (!$ENV{HARNESS_ACTIVE} || $ENV{HARNESS_VERBOSE})
);

plan tests => 3;

# Test 1: Sending a zero length extension block should pass
$proxy->start();
$proxy->start() or plan skip_all => "Unable to start up Proxy for tests";
plan tests => 3;
ok(TLSProxy::Message->success, "Zero extension length test");

sub extension_filter
@@ -111,4 +110,3 @@ $proxy->clear();
$proxy->filter(\&inject_duplicate_extension_serverhello);
$proxy->start();
ok(TLSProxy::Message->fail(), "Duplicate ServerHello extension");
+2 −3
Original line number Diff line number Diff line
@@ -34,12 +34,11 @@ my $proxy = TLSProxy::Proxy->new(
    (!$ENV{HARNESS_ACTIVE} || $ENV{HARNESS_VERBOSE})
);

plan tests => 3;

#Test 1: Injecting out of context empty records should fail
my $content_type = TLSProxy::Record::RT_APPLICATION_DATA;
my $inject_recs_num = 1;
$proxy->start();
$proxy->start() or plan skip_all => "Unable to start up Proxy for tests";
plan tests => 3;
ok(TLSProxy::Message->fail(), "Out of context empty records test");

#Test 2: Injecting in context empty records should succeed
+2 −3
Original line number Diff line number Diff line
@@ -45,12 +45,11 @@ my $proxy = TLSProxy::Proxy->new(
    (!$ENV{HARNESS_ACTIVE} || $ENV{HARNESS_VERBOSE})
);

plan tests => 10;

#Test 1: By default with no existing session we should get a session ticket
#Expected result: ClientHello extension seen; ServerHello extension seen
#                 NewSessionTicket message seen; Full handshake
$proxy->start();
$proxy->start() or plan skip_all => "Unable to start up Proxy for tests";
plan tests => 10;
checkmessages(1, "Default session ticket test", 1, 1, 1, 1);

#Test 2: If the server does not accept tickets we should get a normal handshake
+2 −3
Original line number Diff line number Diff line
@@ -37,13 +37,12 @@ my $proxy = TLSProxy::Proxy->new(
    (!$ENV{HARNESS_ACTIVE} || $ENV{HARNESS_VERBOSE})
);

plan tests => 1;

#We must use an anon DHE cipher for this test
$proxy->cipherc('ADH-AES128-SHA:@SECLEVEL=0');
$proxy->ciphers('ADH-AES128-SHA:@SECLEVEL=0');

$proxy->start();
$proxy->start() or plan skip_all => "Unable to start up Proxy for tests";
plan tests => 1;
ok(TLSProxy::Message->fail, "ServerKeyExchange with 0 p");

sub ske_0_p_filter
Loading