From 1eb8939695fe334fb5af2fef87fa410c0d281d89 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Thu, 28 Apr 2011 12:20:12 +0000 Subject: [PATCH] Stop warnings about undefined _exit on Android. Additional script output options to fipsalgtest.pl --- fips/fips_premain.c | 2 +- fips/fips_premain.c.sha1 | 2 +- fips/fipsalgtest.pl | 27 ++++++++++++++++++++++----- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/fips/fips_premain.c b/fips/fips_premain.c index e284aa9394..40efaf9976 100644 --- a/fips/fips_premain.c +++ b/fips/fips_premain.c @@ -7,7 +7,7 @@ #include #include #include -#if defined(__unix) || defined(__unix__) +#if defined(__unix) || defined(__unix__) || defined(__ANDROID__) #include #endif diff --git a/fips/fips_premain.c.sha1 b/fips/fips_premain.c.sha1 index c7d5414c84..e6d5c716a7 100644 --- a/fips/fips_premain.c.sha1 +++ b/fips/fips_premain.c.sha1 @@ -1 +1 @@ -HMAC-SHA1(fips_premain.c)= dab2842517034a42dfdb21a285d4f0f4d7f6f920 +HMAC-SHA1(fips_premain.c)= 5f546af6cad8753df3956d233db9a6d7cce505aa diff --git a/fips/fipsalgtest.pl b/fips/fipsalgtest.pl index 077fab1bb5..048e3e83d7 100644 --- a/fips/fipsalgtest.pl +++ b/fips/fipsalgtest.pl @@ -462,6 +462,8 @@ my $minimal_script = 0; my $outfile = ''; my $no_warn_missing = 0; my $no_warn_bogus = 0; +my $rmcmd = "rm -rf"; +my $mkcmd = "mkdir"; my %fips_enabled = ( dsa => 1, @@ -549,6 +551,15 @@ foreach (@ARGV) { elsif (/--filter=(.*)$/) { $filter = $1; } + elsif (/--rm=(.*)$/) { + $rmcmd = $1; + } + elsif (/--script-tprefix=(.*)$/) { + $stprefix = $1; + } + elsif (/--mkdir=(.*)$/) { + $mkcmd = $1; + } elsif (/^--list-tests$/) { $list_tests = 1; } @@ -861,7 +872,8 @@ echo Running Algorithm Tests END } else { - print OUT <<\END; + $stprefix = $tprefix unless defined $stprefix; + print OUT <