summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2008-09-17 16:58:01 +0000
committerDr. Stephen Henson <steve@openssl.org>2008-09-17 16:58:01 +0000
commitd245c325298f12f5d88cdd0df2be28ee419531fb (patch)
tree36df9b60fd0d3f4f9158253286f05f966e48cda2 /util
parent964d58bcb0397928f15061998791e9ccb61b2633 (diff)
Update some util files to recognize new FIPS directories.
Diffstat (limited to 'util')
-rw-r--r--util/copy.pl11
-rwxr-xr-xutil/mkdef.pl15
-rw-r--r--util/mkerr.pl3
-rwxr-xr-xutil/mkfiles.pl9
-rwxr-xr-xutil/mklink.pl12
5 files changed, 43 insertions, 7 deletions
diff --git a/util/copy.pl b/util/copy.pl
index e20b45530a..eba6d5815e 100644
--- a/util/copy.pl
+++ b/util/copy.pl
@@ -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);
diff --git a/util/mkdef.pl b/util/mkdef.pl
index 8ecfde1848..26155b887a 100755
--- a/util/mkdef.pl
+++ b/util/mkdef.pl
@@ -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";
+ $fips=1 if /^fips/;
+
if ($_ eq "zlib" || $_ eq "zlib-dynamic"
- || $_ eq "enable-zlib-dynamic") {
- $zlib = 1;
+ || $_ 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 {
diff --git a/util/mkerr.pl b/util/mkerr.pl
index 53e14ab4df..554bebb159 100644
--- a/util/mkerr.pl
+++ b/util/mkerr.pl
@@ -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;
}
diff --git a/util/mkfiles.pl b/util/mkfiles.pl
index 1282392fea..38d3e87377 100755
--- a/util/mkfiles.pl
+++ b/util/mkfiles.pl
@@ -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",
diff --git a/util/mklink.pl b/util/mklink.pl
index d9bc98aab8..eacc327882 100755
--- a/util/mklink.pl
+++ b/util/mklink.pl
@@ -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);