#!/usr/local/bin/perl -w my @fips_tests = ( # FIPS test descriptions # DSA tests ["dsa", "PQGGen", "fips_dssvs pqg"], ["dsa", "KeyPair", "fips_dssvs keypair"], ["dsa", "SigGen", "fips_dssvs siggen"], ["dsa", "SigVer", "fips_dssvs sigver"], # SHA tests ["sha", "SHA1LongMsg", "fips_shatest"], ["sha", "SHA1Monte", "fips_shatest"], ["sha", "SHA1ShortMsg", "fips_shatest"], ["sha", "SHA224LongMsg", "fips_shatest"], ["sha", "SHA224Monte", "fips_shatest"], ["sha", "SHA224ShortMsg", "fips_shatest"], ["sha", "SHA256LongMsg", "fips_shatest"], ["sha", "SHA256Monte", "fips_shatest"], ["sha", "SHA256ShortMsg", "fips_shatest"], ["sha", "SHA384LongMsg", "fips_shatest"], ["sha", "SHA384Monte", "fips_shatest"], ["sha", "SHA384ShortMsg", "fips_shatest"], ["sha", "SHA512LongMsg", "fips_shatest"], ["sha", "SHA512Monte", "fips_shatest"], ["sha", "SHA512ShortMsg", "fips_shatest"], # AES tests, file search mode ["aes", "\@dir", "fips_aesavs -f"], # DES tests, file search mode ["tdes", "\@dir", "fips_desmovs -f"], # HMAC ["hmac", "HMAC", "fips_hmactest"], # RAND tests ["rng", "ANSI931_TDES2MCT", "fips_rngvs mct"], ["rng", "ANSI931_TDES2VST", "fips_rngvs vst"], # RSA tests ["rsa", "SigGen15", "fips_rsastest"], ["rsa", "SigVer15", "fips_rsavtest"], ["rsa", "SigGenPSS", "fips_rsastest -saltlen 0"], ["rsa", "SigVerPSS", "fips_rsavtest -saltlen 0"], ["rsa", "SigGenRSA", "fips_rsastest -x931"], ["rsa", "SigVerRSA", "fips_rsavtest -x931"], ["rsa", "KeyGenRSA", "fips_rsagtest"], ["rsa_salt_62", "SigGenPSS", "fips_rsastest -saltlen 62"], ["rsa_salt_62", "SigVerPSS", "fips_rsavtest -saltlen 62"] ); my $lnum = 0; my $win32 = 0; my $tvdir = "testvectors"; my $ltdir = ""; foreach (@ARGV) { if ($_ eq "--win32") { $win32 = 1; } elsif (/--dir=(.*)$/) { $tvdir = $1; } } if ($win32) { open(OUT, ">fipstests.bat"); print OUT <fipstests.sh"); print OUT <) { if ($win32) { print OUT ".\\$tcmd ../fips-1.0/${_}\n"; } else { print OUT < $rsp\n"; END } else { my $req = "$tvdir/$tdir/req/$fprefix.req"; my $rsp = "$tvdir/$tdir/rsp/$fprefix.rsp"; print OUT < $rsp; fi END } }