Make sure detached fingerprints are installed [as well as minor cygwin
authorAndy Polyakov <appro@openssl.org>
Tue, 14 Jun 2005 12:29:34 +0000 (12:29 +0000)
committerAndy Polyakov <appro@openssl.org>
Tue, 14 Jun 2005 12:29:34 +0000 (12:29 +0000)
and hpux updates].

Makefile.org
apps/Makefile
fips/openssl_fips_fingerprint
test/Makefile

index 98cb2e98bde9707dfe9804bfd9b0c5e74768a64d..1900e89e8cf5e8fa9615c00b1a53b795c5cd5d28 100644 (file)
@@ -343,7 +343,7 @@ do_cygwin-shared:
        [ "$(PLATFORM)" = "mingw" ] && shlib=$${i}eay32.dll; \
        [ -f apps/$$shlib ] && rm apps/$$shlib; \
        [ -f test/$$shlib ] && rm test/$$shlib; \
-       base=;  [ $$i = "crypto" ] && base=-Wl,--image-base,0x61200000; \
+       base=;  [ $$i = "crypto" ] && base=-Wl,--image-base,0x63000000; \
        ( set -x; ${CC} ${SHARED_LDFLAGS} \
                -shared $$base -o $$shlib \
                -Wl,-Bsymbolic \
@@ -518,7 +518,7 @@ do_hpux-shared:
        expr $(PLATFORM) : 'hpux64' > /dev/null && ALLSYMSFLAGS='-Wl,+forceload'; \
        ( set -x; ${CC} ${SHARED_LDFLAGS} \
                -Wl,-B,symbolic,+vnocompatwarnings,-z,+h,$$shlib \
-               -o $$shlib $$ALLSYMSFLAGS lib$$i.a -ldld ) || exit 1; \
+               -o $$shlib $$ALLSYMSFLAGS,lib$$i.a -ldld ) || exit 1; \
        chmod a=rx $$shlib; \
        done
 
@@ -812,7 +812,16 @@ install_sw:
                                if [ "$(PLATFORM)" != "Cygwin" ]; then \
                                        cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
                                        chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
-                                       mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
+                                       mv -f   $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new \
+                                               $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
+                                       sig="$$i.$${HMAC_EXT:-sha1}"; \
+                                       if [ -f $$sig ]; then \
+                                               echo installing $$sig; \
+                                               cp $$sig $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$sig.new; \
+                                               chmod 444 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$sig.new; \
+                                               mv -f   $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$sig.new \
+                                                       $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$sig; \
+                                       fi; \
                                else \
                                        c=`echo $$i | sed 's/^lib\(.*\)\.dll/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
                                        cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
index dd2f1d0af5114b72b242c4fa65b15d0c735c0c7c..5ca70480e73b369311ab633824c9a563b1f6d90f 100644 (file)
@@ -101,8 +101,17 @@ install:
        (echo installing $$i; \
         cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
         chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
-        mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
-        done;
+        mv -f  $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new \
+               $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
+        sig="$$i.$${HMAC_EXT:-sha1}"; \
+        if [ -f $$sig ]; then \
+         echo installing $$sig; \
+         cp $$sig $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$sig.new; \
+         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$sig.new; \
+         mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$sig.new \
+               $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$sig; \
+        fi; \
+       ) done;
        @for i in $(SCRIPTS); \
        do  \
        (echo installing $$i; \
@@ -143,16 +152,20 @@ $(DLIBCRYPTO):
 
 $(EXE): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
        $(RM) $(EXE)
+       SHARED_LIBS="$(SHARED_LIBS)"; \
        if [ "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
+         SHARED_LIBS=""; \
+       fi; \
+       if [ -z "$(SHARED_LIBS)" ]; then \
          set -x; $${CC:-$(CC)} -o $(EXE) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(DLIBSSL) $(LIBKRB5) $(DLIBCRYPTO) $(EX_LIBS) ; \
-       elif [ -z "$(SHARED_LIBS)" ]; then \
-         set -x; $${CC:-$(CC)} -o $(EXE) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) ; \
        else \
          set -x; LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
          $(CC) -o $(EXE) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) ; \
-       fi
-       if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
-               TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $(EXE); \
+       fi; \
+       if [ -z "$$SHARED_LIBS" ]; then \
+         if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
+           TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $(EXE); \
+         fi; \
        fi
        -(cd ..; \
          OPENSSL="`pwd`/util/opensslwrap.sh"; export OPENSSL; \
index eb8c9c253d4113143d8b9645b9f0ab98a11ebe48..f59a67d537d21afd51a5651e4f7856b661998f64 100755 (executable)
@@ -23,7 +23,7 @@ else
 fi
 
 echo "Checking library fingerprint for $lib"
-openssl sha1 -hmac etaonrishdlcupfm $lib | sed "s/(.*\//(/" | diff -w $lib.$ext - || { echo "$libs fingerprint mismatch"; exit 1; }
+openssl sha1 -hmac etaonrishdlcupfm $lib | sed "s/(.*\//(/" | diff -w $lib.sha1 - || { echo "$libs fingerprint mismatch"; exit 1; }
 
 [ -x $exe.exe ] && exe=$exe.exe
 
index 997517375288bf103727d35f07cadf74a7855c82..18454688247373c0793d6c18a38f532aaef91231 100644 (file)
@@ -322,18 +322,21 @@ $(DLIBSSL):
 $(DLIBCRYPTO):
        (cd ..; $(MAKE) DIRS=crypto all)
 
-BUILD_CMD=if [ "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
+BUILD_CMD=SHARED_LIBS="$(SHARED_LIBS)"; \
+       if [ "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
+               SHARED_LIBS=""; \
+       fi; \
+       if [ -z "$$SHARED_LIBS" ]; then \
                set -x; $${CC:-$(CC)} -o $$target$(EXE_EXT) $(CFLAGS) $$target.o $(PEX_LIBS) $(DLIBSSL) $(LIBKRB5) $(DLIBCRYPTO) $(EX_LIBS) ; \
-       elif [ -z "$(SHARED_LIBS)" ]; then \
-               set -x; $${CC:-$(CC)} -o $$target$(EXE_EXT) $(CFLAGS) $$target.o $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) ; \
-       else \
-               set -x; LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       else    set -x; LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
                $(CC) -o $$target$(EXE_EXT) $(CFLAGS) $$target.o $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) ; \
-       fi;
+       fi
 
-FIPS_BUILD_CMD=$(BUILD_CMD) \
-       if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
-         TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $$target; \
+FIPS_BUILD_CMD=$(BUILD_CMD); \
+       if [ -z "$$SHARED_LIBS" ]; then \
+           if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
+               TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $$target; \
+           fi; \
        fi
 
 $(FIPS_AESTEST)$(EXE_EXT): $(FIPS_AESTEST).o $(DLIBCRYPTO)