Update some util files to recognize new FIPS directories.

This commit is contained in:
Dr. Stephen Henson 2008-09-17 16:58:01 +00:00
parent 964d58bcb0
commit d245c32529
5 changed files with 44 additions and 8 deletions

View file

@ -8,9 +8,16 @@ use Fcntl;
# Perl script 'copy' comment. On Windows the built in "copy" command also
# copies timestamps: this messes up Makefile dependencies.
my $stripcr = 0;
my $arg;
foreach $arg (@ARGV) {
if ($arg eq "-stripcr")
{
$stripcr = 1;
next;
}
$arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob...
foreach (glob $arg)
{
@ -49,6 +56,10 @@ foreach (@filelist)
|| die "Can't Open $dfile";
while (sysread IN, $buf, 10240)
{
if ($stripcr)
{
$buf =~ tr/\015//d;
}
syswrite(OUT, $buf, length($buf));
}
close(IN);

View file

@ -79,7 +79,7 @@ my $OS2=0;
my $safe_stack_def = 0;
my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT",
"EXPORT_VAR_AS_FUNCTION", "ZLIB" );
"EXPORT_VAR_AS_FUNCTION", "ZLIB", "OPENSSL_FIPS" );
my @known_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT", "OS2" );
my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
"CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1",
@ -123,6 +123,7 @@ my $no_ec; my $no_ecdsa; my $no_ecdh; my $no_engine; my $no_hw; my $no_camellia;
my $no_seed;
my $no_fp_api; my $no_static_engine; my $no_gmp; my $no_deprecated;
my $no_rfc3779; my $no_tlsext; my $no_cms; my $no_capieng;
my $fips;
foreach (@ARGV, split(/ /, $options))
@ -144,11 +145,13 @@ foreach (@ARGV, split(/ /, $options))
}
$VMS=1 if $_ eq "VMS";
$OS2=1 if $_ eq "OS2";
if ($_ eq "zlib" || $_ eq "zlib-dynamic"
|| $_ eq "enable-zlib-dynamic") {
$zlib = 1;
}
$fips=1 if /^fips/;
if ($_ eq "zlib" || $_ eq "zlib-dynamic"
|| $_ eq "enable-zlib-dynamic") {
$zlib = 1;
}
$do_ssl=1 if $_ eq "ssleay";
if ($_ eq "ssl") {
@ -305,6 +308,7 @@ $crypto.=" crypto/tmdiff.h";
$crypto.=" crypto/store/store.h";
$crypto.=" crypto/pqueue/pqueue.h";
$crypto.=" crypto/cms/cms.h";
$crypto.=" fips/fips.h fips/rand/fips_rand.h";
my $symhacks="crypto/symhacks.h";
@ -1090,6 +1094,9 @@ sub is_valid
if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) {
return 1;
}
if ($keyword eq "OPENSSL_FIPS" && $fips) {
return 1;
}
if ($keyword eq "ZLIB" && $zlib) { return 1; }
return 0;
} else {

View file

@ -44,7 +44,8 @@ while (@ARGV) {
}
if($recurse) {
@source = (<crypto/*.c>, <crypto/*/*.c>, <ssl/*.c>);
@source = ( <crypto/*.c>, <crypto/*/*.c>, <ssl/*.c>,
<fips/*.c>, <fips/*/*.c>);
} else {
@source = @ARGV;
}

View file

@ -58,6 +58,15 @@ my @dirs = (
"crypto/store",
"crypto/pqueue",
"crypto/cms",
"fips",
"fips/aes",
"fips/des",
"fips/dsa",
"fips/dh",
"fips/hmac",
"fips/rand",
"fips/rsa",
"fips/sha",
"ssl",
"apps",
"engines",

View file

@ -15,13 +15,21 @@
# Apart from this, this script should be able to handle even the most
# pathological cases.
use Cwd;
my $pwd;
eval 'use Cwd;';
if ($@)
{
$pwd = `pwd`;
}
else
{
$pwd = getcwd();
}
my $from = shift;
my @files = @ARGV;
my @from_path = split(/[\\\/]/, $from);
my $pwd = getcwd();
chomp($pwd);
my @pwd_path = split(/[\\\/]/, $pwd);