diff options
author | steve <steve> | 2011-02-21 14:07:14 +0000 |
---|---|---|
committer | steve <steve> | 2011-02-21 14:07:14 +0000 |
commit | e4833f4395c1c4c2c57330d4ac93d0a412763c20 (patch) | |
tree | 395c52a5472ea5afac23f6b3c1d6ddbb2b90c1d8 /util/fipsobj.pl | |
parent | b9b63bfce918d9b5a528e6d3984af51ef0444019 (diff) | |
download | openssl-e4833f4395c1c4c2c57330d4ac93d0a412763c20.tar.gz |
Make fipscanisteronly build only required files.
Diffstat (limited to 'util/fipsobj.pl')
-rw-r--r-- | util/fipsobj.pl | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/util/fipsobj.pl b/util/fipsobj.pl new file mode 100644 index 000000000..09fe34a24 --- /dev/null +++ b/util/fipsobj.pl @@ -0,0 +1,31 @@ + +# Filter script. Take all FIPS object files from the environment +# and print out only those in the given directory. + +my $dir = $ARGV[0]; + +my $asmobjs = ""; + +# Add any needed assembly languagr files. + +$asmobjs = $ENV{AES_ENC} if $dir eq "aes"; +$asmobjs = $ENV{BN_ASM} if $dir eq "bn"; +$asmobjs = $ENV{DES_ENC} if $dir eq "des"; +$asmobjs = $ENV{SHA1_ASM_OBJ} if $dir eq "sha"; +$asmobjs = $ENV{MODES_ASM_OBJ} if $dir eq "modes"; + +# Get all other FIPS object files, filtered by directory. + +my @objlist = grep {/crypto\/$dir\//} split / /, $ENV{FIPS_EX_OBJ}; + +push @objlist, split / /, $asmobjs; + +# Fatal error if no matches +die "No objects in $dir!" if (scalar @objlist == 0); + +# Output all matches removing pathname. +foreach (@objlist) + { + s|../crypto/$dir/||; + print "$_\n"; + } |