For Unix fips builds...
authorDr. Stephen Henson <steve@openssl.org>
Sat, 21 Jul 2007 20:18:47 +0000 (20:18 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sat, 21 Jul 2007 20:18:47 +0000 (20:18 +0000)
1. Make shared library build default.
2. Fix libcrypto build to work with shared builds.
3. Link fips utilities to fipscanister.o except for fipsdso builds.

Configure
Makefile.org
test/Makefile

index 496260b8202d9848e80b2288d3f860284cbe0cbb..4b819f81b1f048946f88f5f9f9740677ec040e56 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -903,6 +903,11 @@ print "Configuring for $target\n";
 
 &usage if (!defined($table{$target}));
 
+if ($fips && ($disabled{"shared"} eq "default"))
+       {
+       delete $disabled{"shared"};
+       }
+
 
 foreach (sort (keys %disabled))
        {
@@ -1179,7 +1184,7 @@ if ($zlib)
 my $shared_mark = "";
 if ($shared_target eq "")
        {
-       $no_shared_warn = 1 if !$no_shared;
+       $no_shared_warn = 1 if !$no_shared && !$fips;
        $no_shared = 1;
        }
 if (!$no_shared)
index 2843a9fbb09a178e5b2df79ab8f6d7033cf5d770..6a19e9e898d02b0b5171c30770728eef4aa443f7 100644 (file)
@@ -354,7 +354,12 @@ libcrypto$(SHLIB_EXT): libcrypto.a $(SHARED_FIPS)
                        $(MAKE) SHLIBDIRS='crypto' SHLIBDEPS='-lfips' build-shared; \
                        $(AR) libcrypto.a fips-1.0/fipscanister.o ; \
                else \
-                       $(MAKE) SHLIBDIRS='crypto' build-shared; \
+                       if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
+                               FIPSLD_CC=$(CC); CC=fips-1.0/fipsld; \
+                               FIPSLD_NPT="y"; FIPSLD_LIBFIPS=y; \
+                               export CC FIPSLD_CC FIPSLD_NPT FIPSLD_LIBFIPS; \
+                       fi; \
+                       $(MAKE) -e SHLIBDIRS='crypto' build-shared; \
                fi \
        else \
                echo "There's no support for shared libraries on this platform" >&2; \
index 8421b999aa28c7219a76438b2e4932cea8dbf1ca..2338406d300794df29252ecf55522153a8a820b3 100644 (file)
@@ -397,7 +397,7 @@ $(SHA512TEST)$(EXE_EXT): $(SHA512TEST).o $(DLIBCRYPTO)
 FIPS_BUILD_CMD=shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
                shlib_target="$(SHLIB_TARGET)"; \
        fi; \
-       if [ -z "$(SHARED_LIBS)" -o "$${shlib_target}" = "darwin-shared" ] ; then \
+       if [ "$(FIPSCANLIB)" != "libfips" -o -z "$(SHARED_LIBS)" -o "$${shlib_target}" = "darwin-shared" ] ; then \
                LIBRARIES=""; \
                if [ -n "$(FIPSCANLIB)" ]; then \
                        FIPSLD_CC=$(CC); CC=$(TOP)/fips-1.0/fipsld; FIPSLD_NPT="y" \