Fix test_cmp_vfy failures with FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
[openssl.git] / test / generate_ssl_tests.pl
index 044dff6ad484e946cb5f69b9d98575922fc50e5b..21515b7a20a57994aef43339e2b075f731b5409d 100644 (file)
@@ -19,7 +19,7 @@ use OpenSSL::Test::Utils;
 
 # This block needs to run before 'use lib srctop_dir' directives.
 BEGIN {
-    OpenSSL::Test::setup("no_test_here");
+    OpenSSL::Test::setup("no_test_here", quiet => 1);
 }
 
 use FindBin;
@@ -127,6 +127,11 @@ sub print_templates {
 # Shamelessly copied from Configure.
 sub read_config {
     my $fname = shift;
+    my $provider = shift;
+    local $ssltests::fips_mode = $provider eq "fips";
+    local $ssltests::no_deflt_libctx =
+        $provider eq "default" || $provider eq "fips";
+
     open(INPUT, "< $fname") or die "Can't open input file '$fname'!\n";
     local $/ = undef;
     my $content = <INPUT>;
@@ -136,8 +141,9 @@ sub read_config {
 }
 
 my $input_file = shift;
+my $provider = shift;
 # Reads the tests into ssltests::tests.
-read_config($input_file);
+read_config($input_file, $provider);
 print_templates();
 
 1;