Enc doesn't support AEAD ciphers.
[openssl.git] / fips / fipsalgtest.pl
index 28dd315109b7f996e8cb639a7fee521fbe1c0eb1..30cd9c0ebde6a789ce599d698b5ed6d91942c01c 100644 (file)
@@ -513,29 +513,29 @@ my $mkcmd = "mkdir";
 my $cmpall = 0;
 
 my %fips_enabled = (
-    dsa         => 1,
-    dsa2        => 2,
+    "dsa"        => 1,
+    "dsa2"       => 2,
     "dsa-pqgver"  => 2,
-    ecdsa       => 2,
-    rsa         => 1,
+    "ecdsa"      => 2,
+    "rsa"        => 1,
     "rsa-pss0"  => 2,
     "rsa-pss62" => 1,
-    sha         => 1,
-    hmac        => 1,
-    cmac        => 2,
+    "sha"        => 1,
+    "hmac"       => 1,
+    "cmac"       => 2,
     "rand-aes"  => 1,
     "rand-des2" => 0,
-    aes         => 1,
+    "aes"        => 1,
     "aes-cfb1"  => 2,
-    des3        => 1,
+    "des3"       => 1,
     "des3-cfb1" => 2,
-    drbg       => 2,
+    "drbg"     => 2,
     "aes-ccm"  => 2,
     "aes-xts"  => 2,
     "aes-gcm"  => 2,
-    dh         => 0,
-    ecdh       => 2,
-    v2         => 1,
+    "dh"       => 0,
+    "ecdh"     => 2,
+    "v2"       => 1,
 );
 
 foreach (@ARGV) {
@@ -746,23 +746,29 @@ sub Help {
     ( my $cmd ) = ( $0 =~ m#([^/]+)$# );
     print <<EOF;
 $cmd: generate run CAVP algorithm tests
-       --debug                     Enable debug output
-       --dir=<dirname>             Optional root for *.req file search
-       --filter=<regexp>
-       --onedir <dirname>          Assume all components in current directory
-       --rspdir=<dirname>          Name of subdirectories containing *.rsp files, default "resp"
-       --tprefix=<prefix>
-       --ignore-bogus              Ignore duplicate or bogus files
-       --ignore-missing            Ignore missing test files
-       --quiet                     Shhh....
-       --generate                  Generate algorithm test output
-       --generate-script=<file>    Create shell script of test commands
-       --minimal-script            Keep script commands to a minimum
-       --mkdir=<command>           Command to make directories in scripts
-       --rm=<command>              Command to remove directories in scripts
-       --win32                     Win32 environment
-       --enable-<alg>              Enable algorithm set <alg>.
-       --disable-<alg>             Disable algorithm set <alg>.
+       --debug                       Enable debug output
+       --dir=<dirname>               Optional root for *.req file search
+       --filter=<regexp>             Regex for input files of interest
+       --onedir <dirname>            Assume all components in current directory
+       --rspdir=<dirname>            Name of subdirectories containing *.rsp files, default "resp"
+       --tprefix=<prefix>            Pathname prefix for directory containing test programs
+       --ignore-bogus                Ignore duplicate or bogus files
+       --ignore-missing              Ignore missing test files
+       --quiet                       Shhh....
+       --quiet-bogus                 Skip unrecognized file warnings
+       --quiet-missing               Skip missing request file warnings
+       --generate                    Generate algorithm test output
+       --generate-script=<filename>  Generate script to call algorithm programs
+       --minimal-script              Simplest possible output for --generate-script
+       --win32                       Win32 environment
+       --compare-all                 Verify unconditionally for all tests
+       --list-tests                  Show individual tests
+       --mkdir=<cmd>                 Specify "mkdir" command
+       --notest                      Exit before running tests
+       --rm=<cmd>                    Specify "rm" command
+       --script-tprefix              Pathname prefix for --generate-script output
+       --enable-<alg>                Enable algorithm set <alg>.
+       --disable-<alg>               Disable algorithm set <alg>.
        Where <alg> can be one of:
 EOF
 
@@ -938,6 +944,7 @@ sub run_tests {
     my ( $tname, $tref );
     my $bad = 0;
     my $lastdir = "";
+    $stprefix = $tprefix unless defined $stprefix;
     if ($outfile ne "") {
        open OUT, ">$outfile" || die "Can't open $outfile";
     }
@@ -953,7 +960,6 @@ echo Running Algorithm Tests
 
 END
        } else {
-       $stprefix = $tprefix unless defined $stprefix;
            print OUT <<END;
 #!/bin/sh
 
@@ -1041,8 +1047,12 @@ END
         my $cmd = "$tcmd \"$req\" \"$out\"";
         print STDERR "DEBUG: running test $tname\n" if ( $debug && !$verify );
        if ($outfile ne "") {
-           print OUT "echo \"    running $tname test\"\n" unless $minimal_script;
-           print OUT "\${TPREFIX}$cmd\n";
+           if ($minimal_script) {
+               print OUT "$stprefix$cmd\n";
+           } else {
+               print OUT "echo \"    running $tname test\"\n" unless $minimal_script;
+               print OUT "\${TPREFIX}$cmd\n";
+           }
         } else {
             $cmd = "$tprefix$cmd";
             system($cmd);