# Hudson (tjh@cryptsoft.com).
use strict;
+use OpenSSL::Test qw/:DEFAULT cmdstr top_file top_dir/;
use TLSProxy::Proxy;
+my $test_name = "test_sslskewith0p";
+setup($test_name);
+
+plan skip_all => "$test_name can only be performed with OpenSSL configured shared"
+ unless (map { chomp; s/^SHARED_LIBS=\s*//; $_ }
+ grep { /^SHARED_LIBS=/ }
+ do { local @ARGV = ( top_file("Makefile") ); <> })[0] ne "";
+
+$ENV{OPENSSL_ENGINES} = top_dir("engines");
+$ENV{OPENSSL_ia32cap} = '~0x200000200000000';
my $proxy = TLSProxy::Proxy->new(
\&ske_0_p_filter,
- @ARGV
+ cmdstr(app(["openssl"])),
+ top_file("apps", "server.pem")
);
+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();
-TLSProxy::Message->fail or die "FAILED: ServerKeyExchange with 0 p\n";
-
-print "SUCCESS: ServerKeyExchange with 0 p\n";
+ok(TLSProxy::Message->fail, "ServerKeyExchange with 0 p");
sub ske_0_p_filter
{