Update some util files to recognize new FIPS directories.
This commit is contained in:
parent
964d58bcb0
commit
d245c32529
11
util/copy.pl
11
util/copy.pl
@ -8,9 +8,16 @@ use Fcntl;
|
|||||||
# Perl script 'copy' comment. On Windows the built in "copy" command also
|
# Perl script 'copy' comment. On Windows the built in "copy" command also
|
||||||
# copies timestamps: this messes up Makefile dependencies.
|
# copies timestamps: this messes up Makefile dependencies.
|
||||||
|
|
||||||
|
my $stripcr = 0;
|
||||||
|
|
||||||
my $arg;
|
my $arg;
|
||||||
|
|
||||||
foreach $arg (@ARGV) {
|
foreach $arg (@ARGV) {
|
||||||
|
if ($arg eq "-stripcr")
|
||||||
|
{
|
||||||
|
$stripcr = 1;
|
||||||
|
next;
|
||||||
|
}
|
||||||
$arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob...
|
$arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob...
|
||||||
foreach (glob $arg)
|
foreach (glob $arg)
|
||||||
{
|
{
|
||||||
@ -49,6 +56,10 @@ foreach (@filelist)
|
|||||||
|| die "Can't Open $dfile";
|
|| die "Can't Open $dfile";
|
||||||
while (sysread IN, $buf, 10240)
|
while (sysread IN, $buf, 10240)
|
||||||
{
|
{
|
||||||
|
if ($stripcr)
|
||||||
|
{
|
||||||
|
$buf =~ tr/\015//d;
|
||||||
|
}
|
||||||
syswrite(OUT, $buf, length($buf));
|
syswrite(OUT, $buf, length($buf));
|
||||||
}
|
}
|
||||||
close(IN);
|
close(IN);
|
||||||
|
@ -79,7 +79,7 @@ my $OS2=0;
|
|||||||
my $safe_stack_def = 0;
|
my $safe_stack_def = 0;
|
||||||
|
|
||||||
my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT",
|
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_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT", "OS2" );
|
||||||
my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
|
my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
|
||||||
"CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1",
|
"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_seed;
|
||||||
my $no_fp_api; my $no_static_engine; my $no_gmp; my $no_deprecated;
|
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 $no_rfc3779; my $no_tlsext; my $no_cms; my $no_capieng;
|
||||||
|
my $fips;
|
||||||
|
|
||||||
|
|
||||||
foreach (@ARGV, split(/ /, $options))
|
foreach (@ARGV, split(/ /, $options))
|
||||||
@ -144,6 +145,8 @@ foreach (@ARGV, split(/ /, $options))
|
|||||||
}
|
}
|
||||||
$VMS=1 if $_ eq "VMS";
|
$VMS=1 if $_ eq "VMS";
|
||||||
$OS2=1 if $_ eq "OS2";
|
$OS2=1 if $_ eq "OS2";
|
||||||
|
$fips=1 if /^fips/;
|
||||||
|
|
||||||
if ($_ eq "zlib" || $_ eq "zlib-dynamic"
|
if ($_ eq "zlib" || $_ eq "zlib-dynamic"
|
||||||
|| $_ eq "enable-zlib-dynamic") {
|
|| $_ eq "enable-zlib-dynamic") {
|
||||||
$zlib = 1;
|
$zlib = 1;
|
||||||
@ -305,6 +308,7 @@ $crypto.=" crypto/tmdiff.h";
|
|||||||
$crypto.=" crypto/store/store.h";
|
$crypto.=" crypto/store/store.h";
|
||||||
$crypto.=" crypto/pqueue/pqueue.h";
|
$crypto.=" crypto/pqueue/pqueue.h";
|
||||||
$crypto.=" crypto/cms/cms.h";
|
$crypto.=" crypto/cms/cms.h";
|
||||||
|
$crypto.=" fips/fips.h fips/rand/fips_rand.h";
|
||||||
|
|
||||||
my $symhacks="crypto/symhacks.h";
|
my $symhacks="crypto/symhacks.h";
|
||||||
|
|
||||||
@ -1090,6 +1094,9 @@ sub is_valid
|
|||||||
if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) {
|
if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
if ($keyword eq "OPENSSL_FIPS" && $fips) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
if ($keyword eq "ZLIB" && $zlib) { return 1; }
|
if ($keyword eq "ZLIB" && $zlib) { return 1; }
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
|
@ -44,7 +44,8 @@ while (@ARGV) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($recurse) {
|
if($recurse) {
|
||||||
@source = (<crypto/*.c>, <crypto/*/*.c>, <ssl/*.c>);
|
@source = ( <crypto/*.c>, <crypto/*/*.c>, <ssl/*.c>,
|
||||||
|
<fips/*.c>, <fips/*/*.c>);
|
||||||
} else {
|
} else {
|
||||||
@source = @ARGV;
|
@source = @ARGV;
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,15 @@ my @dirs = (
|
|||||||
"crypto/store",
|
"crypto/store",
|
||||||
"crypto/pqueue",
|
"crypto/pqueue",
|
||||||
"crypto/cms",
|
"crypto/cms",
|
||||||
|
"fips",
|
||||||
|
"fips/aes",
|
||||||
|
"fips/des",
|
||||||
|
"fips/dsa",
|
||||||
|
"fips/dh",
|
||||||
|
"fips/hmac",
|
||||||
|
"fips/rand",
|
||||||
|
"fips/rsa",
|
||||||
|
"fips/sha",
|
||||||
"ssl",
|
"ssl",
|
||||||
"apps",
|
"apps",
|
||||||
"engines",
|
"engines",
|
||||||
|
@ -15,13 +15,21 @@
|
|||||||
# Apart from this, this script should be able to handle even the most
|
# Apart from this, this script should be able to handle even the most
|
||||||
# pathological cases.
|
# pathological cases.
|
||||||
|
|
||||||
use Cwd;
|
my $pwd;
|
||||||
|
eval 'use Cwd;';
|
||||||
|
if ($@)
|
||||||
|
{
|
||||||
|
$pwd = `pwd`;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$pwd = getcwd();
|
||||||
|
}
|
||||||
|
|
||||||
my $from = shift;
|
my $from = shift;
|
||||||
my @files = @ARGV;
|
my @files = @ARGV;
|
||||||
|
|
||||||
my @from_path = split(/[\\\/]/, $from);
|
my @from_path = split(/[\\\/]/, $from);
|
||||||
my $pwd = getcwd();
|
|
||||||
chomp($pwd);
|
chomp($pwd);
|
||||||
my @pwd_path = split(/[\\\/]/, $pwd);
|
my @pwd_path = split(/[\\\/]/, $pwd);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user