#! /usr/bin/env perl
-# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
+# Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved.
#
-# Licensed under the OpenSSL license (the "License"). You may not use
+# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
use File::Spec::Functions qw/catdir catfile curdir abs2rel rel2abs/;
use File::Basename;
-use if $^O ne "VMS", 'File::Glob' => qw/:bsd_glob/;
-use Module::Load::Conditional qw(can_load);
+use FindBin;
+use lib "$FindBin::Bin/../util/perl";
+use OpenSSL::Glob;
-my $TAP_Harness = can_load(modules => { 'TAP::Harness' => undef })
- ? 'TAP::Harness' : 'OpenSSL::TAP::Harness';
+my $TAP_Harness = eval { require TAP::Harness } ? "TAP::Harness"
+ : "OpenSSL::TAP::Harness";
my $srctop = $ENV{SRCTOP} || $ENV{TOP};
my $bldtop = $ENV{BLDTOP} || $ENV{TOP};
my $recipesdir = catdir($srctop, "test", "recipes");
my $libdir = rel2abs(catdir($srctop, "util", "perl"));
+$ENV{OPENSSL_CONF} = catdir($srctop, "apps", "openssl.cnf");
+
my %tapargs =
( verbosity => $ENV{VERBOSE} || $ENV{V} || $ENV{HARNESS_VERBOSE} ? 1 : 0,
lib => [ $libdir ],