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:
21-Sep-2007 20:00:26
Branch: OpenSSL-fips-0_9_8-stable Handle:
2007092119002103
Modified files: (Branch:
OpenSSL-fips-0_9_8-stable)
openssl/fips mkfipsscr.pl
openssl/fips/aes fips_aesavs.c
openssl/fips/des fips_desmovs.c
Log:
New --rspdir option to mkfipsscr.pl to specify alternate
output directory.
Modify fips_aesavs and fips_desmovs to support an
optional output filename
with -f option.
Summary:
Revision Changes Path
1.1.4.3 +20 -13 openssl/fips/aes/fips_aesavs.c
1.1.4.3 +20 -13 openssl/fips/des/fips_desmovs.c
1.1.2.3 +10 -6 openssl/fips/mkfipsscr.pl
____________________________________________________________
________________
patch -p0 <<' .'
Index: openssl/fips/aes/fips_aesavs.c
============================================================
================
$ cvs diff -u -r1.1.4.2 -r1.1.4.3 fips_aesavs.c
--- openssl/fips/aes/fips_aesavs.c 15 Aug 2007 13:35:34
-0000 1.1.4.2
+++ openssl/fips/aes/fips_aesavs.c 21 Sep 2007 18:00:23
-0000 1.1.4.3
 -541,7 +541,7 
# Fri Aug 30 04:07:22 PM
----------------------------*/
-int proc_file(char *rqfile)
+int proc_file(char *rqfile, char *rspfile)
{
char afn[256], rfn[256];
FILE *afp = NULL, *rfp = NULL;
 -573,17 +573,21 
afn, strerror(errno));
return -1;
}
- strcpy(rfn,afn);
- rp=strstr(rfn,"req/");
+ if (!rspfile)
+ {
+ strcpy(rfn,afn);
+ rp=strstr(rfn,"req/");
#ifdef OPENSSL_SYS_WIN32
- if (!rp)
- rp=strstr(rfn,"req\");
+ if (!rp)
+ rp=strstr(rfn,"req\");
#endif
- assert(rp);
- memcpy(rp,"rsp",3);
- rp = strstr(rfn, ".req");
- memcpy(rp, ".rsp", 4);
- if ((rfp = fopen(rfn, "w")) == NULL)
+ assert(rp);
+ memcpy(rp,"rsp",3);
+ rp = strstr(rfn, ".req");
+ memcpy(rp, ".rsp", 4);
+ rspfile = rfn;
+ }
+ if ((rfp = fopen(rspfile, "w")) == NULL)
{
printf("Cannot open file: %s, %sn",
rfn, strerror(errno));
 -852,7 +856,7 
--------------------------------------------------*/
int main(int argc, char **argv)
{
- char *rqlist = "req.txt";
+ char *rqlist = "req.txt", *rspfile = NULL;
FILE *fp = NULL;
char fn[250] = "", rfn[256] =
"";
int f_opt = 0, d_opt = 1;
 -888,7 +892,10 
if (d_opt)
rqlist = argv[2];
else
+ {
strcpy(fn, argv[2]);
+ rspfile = argv[3];
+ }
}
if (d_opt)
{ /* list of files (directory) */
 -903,7 +910,7 
strcpy(rfn, fn);
if (VERBOSE)
printf("Processing: %sn", rfn);
- if (proc_file(rfn))
+ if (proc_file(rfn, rspfile))
{
printf(">>> Processing failed for: %s
<<<n", rfn);
EXIT(1);
 -915,7 +922,7 
{
if (VERBOSE)
printf("Processing: %sn", fn);
- if (proc_file(fn))
+ if (proc_file(fn, rspfile))
{
printf(">>> Processing failed for: %s
<<<n", fn);
}
 .
patch -p0 <<' .'
Index: openssl/fips/des/fips_desmovs.c
============================================================
================
$ cvs diff -u -r1.1.4.2 -r1.1.4.3 fips_desmovs.c
--- openssl/fips/des/fips_desmovs.c 15 Aug 2007 13:35:35
-0000 1.1.4.2
+++ openssl/fips/des/fips_desmovs.c 21 Sep 2007 18:00:24
-0000 1.1.4.3
 -266,7 +266,7 
}
}
-int proc_file(char *rqfile)
+int proc_file(char *rqfile, char *rspfile)
{
char afn[256], rfn[256];
FILE *afp = NULL, *rfp = NULL;
 -297,17 +297,21 
afn, strerror(errno));
return -1;
}
- strcpy(rfn,afn);
- rp=strstr(rfn,"req/");
+ if (!rspfile)
+ {
+ strcpy(rfn,afn);
+ rp=strstr(rfn,"req/");
#ifdef OPENSSL_SYS_WIN32
- if (!rp)
- rp=strstr(rfn,"req\");
+ if (!rp)
+ rp=strstr(rfn,"req\");
#endif
- assert(rp);
- memcpy(rp,"rsp",3);
- rp = strstr(rfn, ".req");
- memcpy(rp, ".rsp", 4);
- if ((rfp = fopen(rfn, "w")) == NULL)
+ assert(rp);
+ memcpy(rp,"rsp",3);
+ rp = strstr(rfn, ".req");
+ memcpy(rp, ".rsp", 4);
+ rspfile = rfn;
+ }
+ if ((rfp = fopen(rspfile, "w")) == NULL)
{
printf("Cannot open file: %s, %sn",
rfn, strerror(errno));
 -623,7 +627,7 
--------------------------------------------------*/
int main(int argc, char **argv)
{
- char *rqlist = "req.txt";
+ char *rqlist = "req.txt", *rspfile = NULL;
FILE *fp = NULL;
char fn[250] = "", rfn[256] =
"";
int f_opt = 0, d_opt = 1;
 -659,7 +663,10 
if (d_opt)
rqlist = argv[2];
else
+ {
strcpy(fn, argv[2]);
+ rspfile = argv[3];
+ }
}
if (d_opt)
{ /* list of files (directory) */
 -673,7 +680,7 
strtok(fn, "rn");
strcpy(rfn, fn);
printf("Processing: %sn", rfn);
- if (proc_file(rfn))
+ if (proc_file(rfn, rspfile))
{
printf(">>> Processing failed for: %s
<<<n", rfn);
EXIT(1);
 -685,7 +692,7 
{
if (VERBOSE)
printf("Processing: %sn", fn);
- if (proc_file(fn))
+ if (proc_file(fn, rspfile))
{
printf(">>> Processing failed for: %s
<<<n", fn);
}
 .
patch -p0 <<' .'
Index: openssl/fips/mkfipsscr.pl
============================================================
================
$ cvs diff -u -r1.1.2.2 -r1.1.2.3 mkfipsscr.pl
--- openssl/fips/mkfipsscr.pl 7 Sep 2007 11:24:25
-0000 1.1.2.2
+++ openssl/fips/mkfipsscr.pl 21 Sep 2007 18:00:21
-0000 1.1.2.3
 -286,6 +286,7 
my $shwrap_prefix;
my $debug = 0;
my $quiet = 0;
+my $rspdir = "rsp";
foreach ( ARGV)
{
 -308,7 +309,10 
elsif (/--dir=(.*)$/)
{
$tvdir = $1;
- # $tvdir .= "/" unless $tvdir =~ //$/;
+ }
+ elsif (/--rspdir=(.*)$/)
+ {
+ $rspdir = $1;
}
elsif (/--tprefix=(.*)$/)
{
 -433,7 +437,7 
{
my ($win32, $req) = _;
my $rsp = $req;
- $rsp =~ s/req$/rsp/;
+ $rsp =~ s/req$/$rspdir/;
if ($win32)
{
$rsp =~ tr|/|\|;
 -460,17 +464,19 
sub test_line
{
my ($win32, $req, $tprefix, $tcmd) = _;
+ my $rsp = $req;
+ $rsp =~ s/req/([^/]*).req$/$rspdir/$1.rsp/;
if ($tcmd =~ /-f$/)
{
if ($win32)
{
$req =~ tr|/|\|;
- print OUT "$tprefix$tcmd
"$req"n";
+ print OUT "$tprefix$tcmd "$req"
"$rsp"n";
}
else
{
print OUT <<END;
-$shlib_wrap.sh $tprefix$tcmd
"$req" || { echo "$req failure" ; exit 1
+$shlib_wrap.sh $tprefix$tcmd
"$req" "$rsp" || { echo "$req
failure" ; exit 1
}
END
}
 -497,8 +503,6 
}
}
- my $rsp = $req;
- $rsp =~ s/req/([^/]*).req$/rsp/$1.rsp/;
if ($win32)
{
$req =~ tr|/|\|;
 .
____________________________________________________________
__________
OpenSSL Project http://www.openssl.org
CVS Repository Commit List
openssl-cvs openssl.org
Automated List Manager
majordomo openssl.org
|