summaryrefslogtreecommitdiffstats
path: root/util/fipsas.pl
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2014-10-19 00:46:00 +0200
committerDr. Stephen Henson <steve@openssl.org>2014-12-08 14:18:43 +0100
commit78c990c156ba79521e98728e9a604b4c5cc8adec (patch)
tree57debcafe0a8426fd24e659180a0812e928b0549 /util/fipsas.pl
parentRemove some unnecessary OPENSSL_FIPS references (diff)
downloadopenssl-78c990c156ba79521e98728e9a604b4c5cc8adec.tar.xz
openssl-78c990c156ba79521e98728e9a604b4c5cc8adec.zip
Remove fipscanister from Configure, delete fips directory
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to '')
-rw-r--r--util/fipsas.pl93
1 files changed, 0 insertions, 93 deletions
diff --git a/util/fipsas.pl b/util/fipsas.pl
deleted file mode 100644
index 1694c59a41..0000000000
--- a/util/fipsas.pl
+++ /dev/null
@@ -1,93 +0,0 @@
-
-# FIPS assembly language preprocessor
-# Renames all symbols in the file to
-# their modified fips versions.
-
-
-my @ARGS = @ARGV;
-
-my $top = shift @ARGS;
-my $target = shift @ARGS;
-my $tmptarg = $target;
-
-$tmptarg =~ s/\.[^\\\/\.]+$/.tmp/;
-
-my $runasm = 1;
-
-if ($ARGS[0] eq "norunasm")
- {
- $runasm = 0;
- shift @ARGS;
- }
-
-my $enabled = 0;
-
-$enabled = 1 if $ENV{FIPSCANISTERINTERNAL} eq "y";
-
-if ($enabled == 0 && $runasm)
- {
- system @ARGS;
- exit $?
- }
-
-
-# Open symbol rename file.
-open(IN, "$top/fips/fipssyms.h") || die "Can't open fipssyms.h";
-
-# Skip to assembler symbols
-while (<IN>)
- {
- last if (/assembler/)
- }
-
-# Store all renames.
-while (<IN>)
- {
- if (/^#define\s+(\w+)\s+(\w+)\b/)
- {
- $edits{$1} = $2;
- }
- }
-
-my ($from, $to);
-
-#delete any temp file lying around
-
-unlink $tmptarg;
-
-#rename target temporarily
-rename($target, $tmptarg) || die "Can't rename $target";
-
-#edit target
-open(IN,$tmptarg) || die "Can't open temporary file";
-open(OUT, ">$target") || die "Can't open output file $target";
-
-while (<IN>)
-{
- while (($from, $to) = each %edits)
- {
- s/(\b_*)$from(\b)/$1$to$2/g;
- }
- print OUT $_;
-}
-
-close OUT;
-
-if ($runasm)
- {
- # run assembler
- system @ARGS;
-
- my $rv = $?;
-
- # restore target
- unlink $target;
- rename $tmptarg, $target;
-
- die "Error executing assembler!" if $rv != 0;
- }
-else
- {
- # Don't care about target
- unlink $tmptarg;
- }