OpenSSL CVS Repository
http://cvs.openssl.org/
____________________________________________________________
________________
Server: cvs.openssl.org Name: Dr.
Stephen Henson
Root: /v/openssl/cvs Email: steve openssl.org
Module: openssl Date:
29-Jan-2007 01:21:08
Branch: OpenSSL-fips2-0_9_7-stable Handle:
2007012900210602
Modified files: (Branch:
OpenSSL-fips2-0_9_7-stable)
openssl/fips-1.0 mkfipsscr.pl
openssl/fips-1.0/aes fips_aesavs.c
openssl/fips-1.0/des fips_desmovs.c
Log:
More options to allow directory locations to be
specified in mkfipsscr.pl
script. Make AES/DES algorithm test programs handle
Win32 path separator.
Switch off verbose mode in AES test program.
Summary:
Revision Changes Path
1.1.2.5.2.1 +5 -1
openssl/fips-1.0/aes/fips_aesavs.c
1.1.2.4.2.1 +4 -0
openssl/fips-1.0/des/fips_desmovs.c
1.1.2.2.2.1 +61 -13 openssl/fips-1.0/mkfipsscr.pl
____________________________________________________________
________________
patch -p0 <<' .'
Index: openssl/fips-1.0/aes/fips_aesavs.c
============================================================
================
$ cvs diff -u -r1.1.2.5 -r1.1.2.5.2.1 fips_aesavs.c
--- openssl/fips-1.0/aes/fips_aesavs.c 23 Jan 2007
01:40:27 -0000 1.1.2.5
+++ openssl/fips-1.0/aes/fips_aesavs.c 29 Jan 2007
00:21:07 -0000 1.1.2.5.2.1
 -82,7 +82,7 
#define AES_BLOCK_SIZE 16
-#define VERBOSE 1
+#define VERBOSE 0
/*-----------------------------------------------*/
 -727,6 +727,10 
}
strcpy(rfn,afn);
rp=strstr(rfn,"req/");
+#ifdef OPENSSL_SYS_WIN32
+ if (!rp)
+ rp=strstr(rfn,"req\");
+#endif
assert(rp);
memcpy(rp,"rsp",3);
rp = strstr(rfn, ".req");
 .
patch -p0 <<' .'
Index: openssl/fips-1.0/des/fips_desmovs.c
============================================================
================
$ cvs diff -u -r1.1.2.4 -r1.1.2.4.2.1 fips_desmovs.c
--- openssl/fips-1.0/des/fips_desmovs.c 23 Jan 2007
01:40:28 -0000 1.1.2.4
+++ openssl/fips-1.0/des/fips_desmovs.c 29 Jan 2007
00:21:08 -0000 1.1.2.4.2.1
 -590,6 +590,10 
}
strcpy(rfn,afn);
rp=strstr(rfn,"req/");
+#ifdef OPENSSL_SYS_WIN32
+ if (!rp)
+ rp=strstr(rfn,"req\");
+#endif
assert(rp);
memcpy(rp,"rsp",3);
rp = strstr(rfn, ".req");
 .
patch -p0 <<' .'
Index: openssl/fips-1.0/mkfipsscr.pl
============================================================
================
$ cvs diff -u -r1.1.2.2 -r1.1.2.2.2.1 mkfipsscr.pl
--- openssl/fips-1.0/mkfipsscr.pl 16 Jan 2007 14:32:14
-0000 1.1.2.2
+++ openssl/fips-1.0/mkfipsscr.pl 29 Jan 2007 00:21:06
-0000 1.1.2.2.2.1
 -60,8 +60,12 
my $lnum = 0;
my $win32 = 0;
-my $tvdir = "testvectors";
+my $onedir = 0;
my $ltdir = "";
+my $tvdir;
+my $tvprefix;
+my $tprefix;
+my $shwrap_prefix;
foreach ( ARGV)
{
 -69,15 +73,48 
{
$win32 = 1;
}
+ elsif ($_ eq "--onedir")
+ {
+ $onedir = 1;
+ }
elsif (/--dir=(.*)$/)
{
$tvdir = $1;
}
+ elsif (/--tprefix=(.*)$/)
+ {
+ $tprefix = $1;
+ }
+ elsif (/--tvprefix=(.*)$/)
+ {
+ $tvprefix = $1;
+ }
+ elsif (/--shwrap_prefix=(.*)$/)
+ {
+ $shwrap_prefix = $1;
+ }
+ elsif (/--outfile=(.*)$/)
+ {
+ $outfile = $1;
+ }
}
+$tvdir = "testvectors" unless defined $tvdir;
+$shwrap_prefix = "../util/" unless defined
$shwrap_prefix;
+
if ($win32)
{
- open(OUT, ">fipstests.bat");
+ if ($onedir)
+ {
+ $tvprefix = "" unless defined $tvprefix;
+ }
+ else
+ {
+ $tvprefix = "..\fips-1.0\" unless defined
$tvprefix;
+ }
+ $tprefix = ".\" unless defined $tprefix;
+ $outfile = "fipstests.bat" unless defined
$outfile;
+ open(OUT, ">$outfile");
print OUT <<END;
echo off
 -90,9 +127,19 
}
else
{
-open(OUT, ">fipstests.sh");
+ $tvprefix = "" unless defined $tvprefix;
+ if ($onedir)
+ {
+ $tprefix = "./" unless defined $tprefix;
+ }
+ else
+ {
+ $tprefix = "../test/" unless defined
$tprefix;
+ }
+ $outfile = "fipstests.sh" unless defined
$outfile;
+ open(OUT, ">$outfile");
-print OUT <<END;
+ print OUT <<END;
#!/bin/sh
# Test vector run script
 -120,7 +167,7 
my ($win32, $tdir) = _;
if ($win32)
{
- my $rsp =
"..\fips-1.0\$tvdir\$tdir\rsp";
+ my $rsp = "$tvprefix$tvdir\$tdir\rsp";
print OUT <<END;
echo $tdir tests
 -146,16 +193,17 
my ($win32, $tdir, $fprefix, $tcmd) = _;
if ($fprefix =~ / /)
{
- foreach(<$tvdir/$tdir/req/*.req>)
+ foreach(<$tvprefix$tvdir/$tdir/req/*.req>)
{
if ($win32)
{
- print OUT ".\$tcmd ../fips-1.0/$n";
+ $_ =~ tr|/|\|;
+ print OUT "$tprefix$tcmd $_n";
}
else
{
print OUT <<END;
-../util/shlib_wrap.sh ../test/$tcmd $_
+$shlib_wrap.sh $tprefix$tcmd $_
END
}
}
 -163,17 +211,17 
}
if ($win32)
{
- my $req =
"..\fips-1.0\$tvdir\$tdir\req\$fprefix.req";
- my $rsp =
"..\fips-1.0\$tvdir\$tdir\rsp\$fprefix.rsp";
- print OUT ".\$tcmd < $req > $rspn";
+ my $req =
"$tvprefix$tvdir\$tdir\req\$fprefix.req";
+ my $rsp =
"$tvprefix$tvdir\$tdir\rsp\$fprefix.rsp";
+ print OUT "$tprefix$tcmd < $req >
$rspn";
END
}
else
{
- my $req = "$tvdir/$tdir/req/$fprefix.req";
+ my $req = "tvdir/$tdir/req/$fprefix.req";
my $rsp = "$tvdir/$tdir/rsp/$fprefix.rsp";
print OUT <<END;
-if [ -f $req ] ; then ../util/shlib_wrap.sh ../test/$tcmd
< $req > $rsp; fi
+if [ -f $req ] ; then $shlib_wrap.sh
$tprefix$tcmd < $req > $rsp; fi
END
}
}
 .
____________________________________________________________
__________
OpenSSL Project http://www.openssl.org
CVS Repository Commit List
openssl-cvs openssl.org
Automated List Manager
majordomo openssl.org
|