#! /usr/bin/env perl
-# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
+# Copyright 2015-2020 The OpenSSL Project Authors. All Rights Reserved.
#
# 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
use platform;
my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0);
+my $infile = bldtop_file('providers', platform->dso('fips'));
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"),
unless ($no_fips) {
push @setups, {
cmd => app(['openssl', 'fipsinstall',
- '-out', bldtop_file('providers', 'fipsinstall.conf'),
- '-module', bldtop_file('providers', platform->dso('fips')),
- '-provider_name', 'fips', '-mac_name', 'HMAC',
- '-macopt', 'digest:SHA256', '-macopt', 'hexkey:00',
- '-section_name', 'fips_sect']),
+ '-out', bldtop_file('providers', 'fipsmodule.cnf'),
+ '-module', $infile]),
message => "fipsinstall"
};
push @testdata, (
foreach my $alg (@types) {
foreach my $testcase (@testdata) {
- $ENV{OPENSSL_CONF} = $testcase->{config};
+ $ENV{OPENSSL_CONF} = "";
foreach my $test (@{$testcase->{tests}}) {
my @testproviders =
@{ $test->{providers} // $testcase->{providers} };
"running evp_fetch_prov_test with $alg$testprovstr$testmsg";
ok(run(test(["evp_fetch_prov_test", "-type", "$alg",
+ "-config", "$testcase->{config}",
@testargs, @testproviders])),
$message);
}