]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - test/recipes/30-test_evp_fetch_prov.t
Raise an error on syscall failure in tls_retry_write_records
[thirdparty/openssl.git] / test / recipes / 30-test_evp_fetch_prov.t
index 8ffd2a50d8567989b8959f4436bbc843cd82d14d..63082dd311f460d799df31783398685af7efbe02 100644 (file)
@@ -1,5 +1,5 @@
 #! /usr/bin/env perl
-# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
+# Copyright 2015-2021 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
@@ -18,16 +18,11 @@ setup("test_evp_fetch_prov");
 
 use lib srctop_dir('Configurations');
 use lib bldtop_dir('.');
-use platform;
 
 my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0);
 
 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"),
       providers => [ 'default' ],
@@ -46,15 +41,6 @@ my @testdata = (
 );
 
 unless ($no_fips) {
-    push @setups, {
-        cmd     => app(['openssl', 'fipsinstall',
-                        '-out', bldtop_file('providers', 'fipsinstall.cnf'),
-                        '-module', bldtop_file('providers', platform->dso('fips')),
-                        '-provider_name', 'fips', '-mac_name', 'HMAC',
-                        '-macopt', 'digest:SHA256', '-macopt', 'hexkey:00',
-                        '-section_name', 'fips_sect']),
-        message => "fipsinstall"
-    };
     push @testdata, (
         { config    => srctop_file("test", "fips.cnf"),
           providers => [ 'fips' ],
@@ -110,18 +96,14 @@ foreach (@testdata) {
     $testcount += scalar @{$_->{tests}};
 }
 
-plan tests => 1 + scalar @setups + $testcount * scalar(@types);
+plan tests => 1 + $testcount * scalar(@types);
 
 ok(run(test(["evp_fetch_prov_test", "-defaultctx"])),
    "running evp_fetch_prov_test using the default libctx");
 
-foreach my $setup (@setups) {
-    ok(run($setup->{cmd}), $setup->{message});
-}
-
 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} };
@@ -137,6 +119,7 @@ foreach my $alg (@types) {
                 "running evp_fetch_prov_test with $alg$testprovstr$testmsg";
 
             ok(run(test(["evp_fetch_prov_test", "-type", "$alg",
+                         "-config", "$testcase->{config}",
                          @testargs, @testproviders])),
                $message);
         }