From 30b56225ccff9067ac5a5e49643d52d1e979cb24 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Fri, 11 Feb 2011 19:02:34 +0000 Subject: [PATCH] New "fispcanisteronly" build option: only build fipscanister.o and associated utilities. This functionality will be used by the validated tarball. --- CHANGES | 5 +++++ Configure | 13 ++++++++++++- fips/Makefile | 4 +++- test/Makefile | 12 ++++++++---- 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index 36bbb2da67..491ea7f1b7 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,11 @@ Changes between 1.0.1 and 1.1.0 [xx XXX xxxx] + *) New build option "fipscanisteronly". This only builds fipscanister.o + and (currently) associated fips utilities. Uses the file Makefile.fips + instead of Makefile.org as the prototype. + [Steve Henson] + *) Add some FIPS mode restrictions to GCM. Add internal IV generator. Update fips_gcmtest to use IV generator. [Steve Henson] diff --git a/Configure b/Configure index 0a5b19f4b8..2cb5a67e7f 100755 --- a/Configure +++ b/Configure @@ -654,6 +654,7 @@ my $fipslibdir="/usr/local/ssl/fips-2.0/lib/"; my $nofipscanistercheck=0; my $fipsdso=0; my $fipscanisterinternal="n"; +my $fipscanisteronly = 0; my $baseaddr="0xFB00000"; my $no_threads=0; my $threads=0; @@ -851,6 +852,14 @@ PROCESS_ARGS: $fips = 1; $nofipscanistercheck = 1; } + elsif (/^fipscanisteronly$/) + { + $fips = 1; + $nofipscanistercheck = 1; + $fipslibdir=""; + $fipscanisterinternal="y"; + $fipscanisteronly = 1; + } elsif (/^fipscanisterbuild$/) { $fips = 1; @@ -1565,7 +1574,9 @@ if ($strict_warnings) } } -open(IN,'$Makefile.new") || die "unable to create $Makefile.new:$!\n"; print OUT "### Generated automatically from Makefile.org by Configure.\n\n"; diff --git a/fips/Makefile b/fips/Makefile index 6d4c27fd1b..52163b7f1b 100644 --- a/fips/Makefile +++ b/fips/Makefile @@ -62,7 +62,9 @@ testapps: @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi all: - @if [ -z "$(FIPSLIBDIR)" ]; then \ + @if [ -n "$(FIPSCANISTERONLY)" ]; then \ + $(MAKE) -e subdirs lib ; \ + elif [ -z "$(FIPSLIBDIR)" ]; then \ $(MAKE) -e subdirs lib fips_premain_dso$(EXE_EXT); \ else \ $(MAKE) -e lib fips_premain_dso$(EXE_EXT) fips_standalone_sha1$(EXE_EXT); \ diff --git a/test/Makefile b/test/Makefile index 4cbbf72895..362cd495bb 100644 --- a/test/Makefile +++ b/test/Makefile @@ -84,9 +84,11 @@ EXE= $(BNTEST)$(EXE_EXT) $(ECTEST)$(EXE_EXT) $(ECDSATEST)$(EXE_EXT) $(ECDHTEST) $(DESTEST)$(EXE_EXT) $(SHATEST)$(EXE_EXT) $(SHA1TEST)$(EXE_EXT) $(SHA256TEST)$(EXE_EXT) $(SHA512TEST)$(EXE_EXT) \ $(MDC2TEST)$(EXE_EXT) $(RMDTEST)$(EXE_EXT) \ $(RANDTEST)$(EXE_EXT) $(DHTEST)$(EXE_EXT) $(ENGINETEST)$(EXE_EXT) \ - $(BFTEST)$(EXE_EXT) $(CASTTEST)$(EXE_EXT) $(SSLTEST)$(EXE_EXT) $(EXPTEST)$(EXE_EXT) $(DSATEST)$(EXE_EXT) $(RSATEST)$(EXE_EXT) \ - $(EVPTEST)$(EXE_EXT) $(IGETEST)$(EXE_EXT) $(JPAKETEST)$(EXE_EXT) \ - $(FIPS_SHATEST)$(EXE_EXT) $(FIPS_DESTEST)$(EXE_EXT) \ + $(BFTEST)$(EXE_EXT) $(CASTTEST)$(EXE_EXT) $(SSLTEST)$(EXE_EXT) \ + $(EXPTEST)$(EXE_EXT) $(DSATEST)$(EXE_EXT) $(RSATEST)$(EXE_EXT) \ + $(EVPTEST)$(EXE_EXT) $(IGETEST)$(EXE_EXT) $(JPAKETEST)$(EXE_EXT) + +FIPSEXE=$(FIPS_SHATEST)$(EXE_EXT) $(FIPS_DESTEST)$(EXE_EXT) \ $(FIPS_RANDTEST)$(EXE_EXT) $(FIPS_AESTEST)$(EXE_EXT) \ $(FIPS_HMACTEST)$(EXE_EXT) $(FIPS_RSAVTEST)$(EXE_EXT) \ $(FIPS_RSASTEST)$(EXE_EXT) $(FIPS_RSAGTEST)$(EXE_EXT) \ @@ -132,7 +134,9 @@ top: all: exe -exe: $(EXE) dummytest$(EXE_EXT) +exe: $(EXE) $(FIPSEXE) dummytest$(EXE_EXT) + +fipsexe: $(FIPSEXE) files: $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO -- 2.40.0