The former produces a more meaningful message on failure than the latter.
+Note that the test infrastructure automatically sets up all required environment
+variables (such as OPENSSL_MODULES, OPENSSL_CONF etc) for the tests. Individual
+tests may choose to override the default settings as required.
+
plan tests => 12;
my $infile = bldtop_file('providers', platform->dso('fips'));
-$ENV{OPENSSL_MODULES} = bldtop_dir("providers");
# fail if no module name
ok(!run(app(['openssl', 'fipsinstall', '-out', 'fips.cnf', '-module',
# https://www.openssl.org/source/license.html
use strict;
-use OpenSSL::Test qw/:DEFAULT bldtop_dir/;
+use OpenSSL::Test qw/:DEFAULT/;
use OpenSSL::Test::Utils;
my $test_name = "test_afalg";
plan tests => 1;
-$ENV{OPENSSL_ENGINES} = bldtop_dir("engines");
-
ok(run(test(["afalgtest"])), "running afalgtest");
unless ($no_fips) {
my $infile = bldtop_file('providers', platform->dso('fips'));
- $ENV{OPENSSL_MODULES} = bldtop_dir("providers");
- $ENV{OPENSSL_CONF_INCLUDE} = bldtop_dir("providers");
ok(run(app(['openssl', 'fipsinstall',
'-out', bldtop_file('providers', 'fipsmodule.cnf'),
my @types = ( "digest", "cipher" );
-$ENV{OPENSSL_MODULES} = bldtop_dir("providers");
-$ENV{OPENSSL_CONF_INCLUDE} = bldtop_dir("providers");
-
my @setups = ();
my @testdata = (
{ config => srctop_file("test", "default.cnf"),
if disabled("tls1_3") && disabled("tls1_2");
$ENV{OPENSSL_ia32cap} = '~0x200000200000000';
-$ENV{CTLOG_FILE} = srctop_file("test", "ct", "log_list.cnf");
use constant {
MULTIPLE_COMPRESSIONS => 0,
|| (!disabled("tls1_3") && disabled("tls1_2"));
$ENV{OPENSSL_ia32cap} = '~0x200000200000000';
-$ENV{CTLOG_FILE} = srctop_file("test", "ct", "log_list.cnf");
my $proxy = TLSProxy::Proxy->new(
undef,
if disabled("ec");
$ENV{OPENSSL_ia32cap} = '~0x200000200000000';
-$ENV{CTLOG_FILE} = srctop_file("test", "ct", "log_list.cnf");
@handmessages = (
if disabled("ec");
$ENV{OPENSSL_ia32cap} = '~0x200000200000000';
-$ENV{CTLOG_FILE} = srctop_file("test", "ct", "log_list.cnf");
-
@handmessages = (
[TLSProxy::Message::MT_CLIENT_HELLO,
if disabled("tls1_3");
$ENV{OPENSSL_ia32cap} = '~0x200000200000000';
-$ENV{CTLOG_FILE} = srctop_file("test", "ct", "log_list.cnf");
my $proxy = TLSProxy::Proxy->new(
undef,
use OpenSSL::Test::Simple;
setup("test_ct");
-$ENV{CTLOG_FILE} = srctop_file("test", "ct", "log_list.cnf");
+
$ENV{CT_DIR} = srctop_dir("test", "ct");
$ENV{CERTS_DIR} = srctop_dir("test", "certs");
simple_test("test_ct", "ct_test", "ct", "ec");
my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0);
-$ENV{OPENSSL_MODULES} = bldtop_dir("providers");
-$ENV{OPENSSL_CONF_INCLUDE} = bldtop_dir("providers");
$ENV{TEST_CERTS_DIR} = srctop_dir("test", "certs");
-$ENV{CTLOG_FILE} = srctop_file("test", "ct", "log_list.cnf");
my @conf_srcs = glob(srctop_file("test", "ssl-tests", "*.cnf.in"));
map { s/;.*// } @conf_srcs if $^O eq "VMS";
use lib bldtop_dir('.');
use platform;
-$ENV{CTLOG_FILE} = srctop_file("test", "ct", "log_list.cnf");
-$ENV{OPENSSL_MODULES} = bldtop_dir("providers");
-$ENV{OPENSSL_CONF_INCLUDE} = bldtop_dir("providers");
-
my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0);
my ($no_rsa, $no_dsa, $no_dh, $no_ec, $no_psk,
$no_ssl3, $no_tls1, $no_tls1_1, $no_tls1_2, $no_tls1_3,
plan skip_all => "test_includes doesn't work without posix-io"
if disabled("posix-io");
+delete $ENV{OPENSSL_CONF_INCLUDE};
+
plan tests => # The number of tests being performed
5
+ ($^O eq "VMS" ? 2 : 0);
(undef, my $tmpfilename) = tempfile();
-$ENV{OPENSSL_MODULES} = bldtop_dir("providers");
-$ENV{OPENSSL_CONF_INCLUDE} = bldtop_dir("providers");
-
ok(run(test(["sslapitest", srctop_dir("test", "certs"),
srctop_file("test", "recipes", "90-test_sslapi_data",
"passwd.txt"), $tmpfilename, "default",
plan tests => 3;
-$ENV{OPENSSL_MODULES} = bldtop_dir("providers");
-$ENV{OPENSSL_CONF_INCLUDE} = bldtop_dir("providers");
-
SKIP: {
skip "Skipping FIPS installation", 1
if disabled("fips");
my $recipesdir = catdir($srctop, "test", "recipes");
my $libdir = rel2abs(catdir($srctop, "util", "perl"));
-$ENV{OPENSSL_CONF} = catdir($srctop, "apps", "openssl.cnf");
+$ENV{OPENSSL_CONF} = rel2abs(catdir($srctop, "apps", "openssl.cnf"));
+$ENV{OPENSSL_CONF_INCLUDE} = rel2abs(catdir($bldtop, "providers"));
+$ENV{OPENSSL_MODULES} = rel2abs(catdir($bldtop, "providers"));
+$ENV{OPENSSL_ENGINES} = rel2abs(catdir($bldtop, "engines"));
+$ENV{CTLOG_FILE} = rel2abs(catdir($srctop, "test", "ct", "log_list.cnf"));
my %tapargs =
( verbosity => $ENV{HARNESS_VERBOSE} ? 1 : 0,