From ec47bb7c817207b5904e8cfd01cb91aba119dd4e Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Mon, 11 Aug 2003 10:24:52 +0000 Subject: [PATCH] - Add a configuration keyword "fips" to compile with FIPS implementations. - Reorder the build so the standalone FIPS SHA1 checker is built first. - Add necessary defines to avoid symbol clashes between FIPS and non-FIPS implementations. - Change necessary signatures. - Correct bugs in FIPS build Makefiles. - make update --- Configure | 10 +++- Makefile.org | 4 +- apps/Makefile.ssl | 2 +- crypto/sha/sha1dgst.c | 7 +++ fips/Makefile.ssl | 5 +- fips/aes/Makefile.ssl | 2 +- fips/des/Makefile.ssl | 2 +- fips/des/fingerprint.sha1 | 2 +- fips/sha1/Makefile.ssl | 19 ++++---- test/Makefile.ssl | 96 +++++++++++++++++++++++++-------------- util/libeay.num | 6 +-- 11 files changed, 101 insertions(+), 54 deletions(-) diff --git a/Configure b/Configure index 5251903ba2..e26e4dcb5c 100755 --- a/Configure +++ b/Configure @@ -630,6 +630,7 @@ my $rmd160_obj=""; my $processor=""; my $default_ranlib; my $perl; +my $fips=0; my $no_ssl2=0; my $no_ssl3=0; @@ -803,6 +804,8 @@ PROCESS_ARGS: } elsif (/^386$/) { $processor=386; } + elsif (/^fips$/) + { $fips=1; } elsif (/^rsaref$/) { # No RSAref support any more since it's not needed. @@ -1138,7 +1141,12 @@ if ($ranlib eq "") $bn_obj = $bn_asm unless $bn_obj ne ""; -$des_obj=$des_enc unless ($des_obj =~ /\.o$/); +if ($fips) + { + $des_obj=$sha1_obj=""; + $cflags.=" -DFIPS"; + } +$des_obj=$des_enc unless (!$fips && $des_obj =~ /\.o$/); $bf_obj=$bf_enc unless ($bf_obj =~ /\.o$/); $cast_obj=$cast_enc unless ($cast_obj =~ /\.o$/); $rc4_obj=$rc4_enc unless ($rc4_obj =~ /\.o$/); diff --git a/Makefile.org b/Makefile.org index cfdab96a86..3c27326e5c 100644 --- a/Makefile.org +++ b/Makefile.org @@ -173,7 +173,7 @@ LIBKRB5= # we might set SHLIB_MARK to '$(SHARED_LIBS)'. SHLIB_MARK= -DIRS= crypto fips ssl $(SHLIB_MARK) apps test tools +DIRS= fips crypto ssl $(SHLIB_MARK) apps test tools SHLIBDIRS= fips crypto ssl # dirs in crypto to build @@ -184,7 +184,7 @@ SDIRS= objects \ buffer bio stack lhash rand err \ evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 -FDIRS= rand sha1 des aes dsa +FDIRS= sha1 rand des aes dsa # tests to perform. "alltests" is a special word indicating that all tests # should be performed. diff --git a/apps/Makefile.ssl b/apps/Makefile.ssl index 90e71dee76..775d53b057 100644 --- a/apps/Makefile.ssl +++ b/apps/Makefile.ssl @@ -145,7 +145,7 @@ $(DLIBCRYPTO): $(PROGRAM): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL) $(RM) $(PROGRAM) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(DLIBSSL) $(LIBKRB5) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ diff --git a/crypto/sha/sha1dgst.c b/crypto/sha/sha1dgst.c index 182f65982a..3e5d1e9e7b 100644 --- a/crypto/sha/sha1dgst.c +++ b/crypto/sha/sha1dgst.c @@ -63,11 +63,18 @@ #include +#ifndef FIPS const char *SHA1_version="SHA1" OPENSSL_VERSION_PTEXT; /* The implementation is in ../md32_common.h */ #include "sha_locl.h" +#else /* ndef FIPS */ + +static void *dummy=&dummy; + +#endif /* ndef FIPS */ + #endif diff --git a/fips/Makefile.ssl b/fips/Makefile.ssl index 25c4799403..5adbe46b61 100644 --- a/fips/Makefile.ssl +++ b/fips/Makefile.ssl @@ -26,7 +26,7 @@ CFLAGS= $(INCLUDE) $(CFLAG) LIBS= -FDIRS=rand sha1 des aes dsa +FDIRS=sha1 rand des aes dsa GENERAL=Makefile README fips-lib.com install.com @@ -45,7 +45,8 @@ ALL= $(GENERAL) $(SRC) $(HEADER) top: @(cd ..; $(MAKE) DIRS=$(DIR) all) -all: check lib subdirs shared +all: subdirs lib check shared + ls -l $(LIB) $(LIBOBJ) check: TOP=`pwd`/$(TOP) ./fips_check_sha1 fingerprint.sha1 $(SRC) $(HEADER) diff --git a/fips/aes/Makefile.ssl b/fips/aes/Makefile.ssl index c6ad52ff77..d0cd299ad6 100644 --- a/fips/aes/Makefile.ssl +++ b/fips/aes/Makefile.ssl @@ -36,7 +36,7 @@ ALL= $(GENERAL) $(SRC) $(HEADER) top: (cd ../..; $(MAKE) DIRS=fips FDIRS=$(DIR) sub_all) -all: check lib fips_aesavs +all: check lib check: TOP=`pwd`/$(TOP) ../fips_check_sha1 fingerprint.sha1 $(SRC) $(HEADER) diff --git a/fips/des/Makefile.ssl b/fips/des/Makefile.ssl index 92041dec2a..77738cdd5e 100644 --- a/fips/des/Makefile.ssl +++ b/fips/des/Makefile.ssl @@ -19,7 +19,7 @@ AR= ar r CFLAGS= $(INCLUDES) $(CFLAG) -g GENERAL=Makefile -TEST= +TEST= fips_desmovs.c APPS= LIB=$(TOP)/libcrypto.a diff --git a/fips/des/fingerprint.sha1 b/fips/des/fingerprint.sha1 index 3098ee217b..9f6bba874a 100644 --- a/fips/des/fingerprint.sha1 +++ b/fips/des/fingerprint.sha1 @@ -1,2 +1,2 @@ -SHA1(fips_des_enc.c)= 1661dde9506404376f9565d8c6f49c205a468995 +SHA1(fips_des_enc.c)= a4b88bb16782604a298d74de04a8b3bc3a204c5a SHA1(fips_des_locl.h)= 5e5128f074485e72d6fdee00d22d46a694bd5abe diff --git a/fips/sha1/Makefile.ssl b/fips/sha1/Makefile.ssl index c2c5c1ebaa..4ea1e4bad3 100644 --- a/fips/sha1/Makefile.ssl +++ b/fips/sha1/Makefile.ssl @@ -21,12 +21,13 @@ CFLAGS= $(INCLUDES) $(CFLAG) GENERAL=Makefile TEST= fips_sha1test.c sha1vectors.txt sha1hashes.txt APPS= +EXE= fips_standalone_sha1 LIB=$(TOP)/libcrypto.a LIBSRC=fips_sha1dgst.c LIBOBJ=fips_sha1dgst.o -SRC= $(LIBSRC) +SRC= $(LIBSRC) fips_standalone_sha1.c EXHEADER= HEADER= $(EXHEADER) fips_sha_locl.h fips_md32_common.h @@ -36,10 +37,10 @@ ALL= $(GENERAL) $(SRC) $(HEADER) top: (cd ../..; $(MAKE) DIRS=fips SDIRS=$(DIR) sub_all) -all: check lib fips_standalone_sha1 +all: fips_standalone_sha1 check lib check: - TOP=`pwd`/$(TOP) ../fips_check_sha1 fingerprint.sha1 $(SRC) $(HEADER) + TOP=`pwd`/$(TOP) ../fips_check_sha1 fingerprint.sha1 $(LIBSRC) $(HEADER) lib: $(LIBOBJ) $(AR) $(LIB) $(LIBOBJ) @@ -49,9 +50,7 @@ lib: $(LIBOBJ) fips_standalone_sha1: fips_standalone_sha1.o fips_sha1dgst.o $(CC) -o fips_standalone_sha1 $(CFLAGS) fips_standalone_sha1.o \ fips_sha1dgst.o - TOP=`pwd`/$(TOP) ../fips_check_sha1 standalone.sha1 \ - fips_standalone_sha1.c fips_sha1dgst.c fips_sha_locl.h \ - fips_md32_common.h + TOP=`pwd`/$(TOP) ../fips_check_sha1 standalone.sha1 $(SRC) $(HEADER) files: $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO @@ -78,14 +77,18 @@ lint: lint -DLINT $(INCLUDES) $(SRC)>fluff depend: - $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(SRC) dclean: $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new mv -f Makefile.new $(MAKEFILE) clean: - rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) + # DO NOT DELETE THIS LINE -- make depend depends on it. fips_sha1dgst.o: ../../include/openssl/opensslv.h fips_sha1dgst.c +fips_standalone_sha1.o: ../../include/openssl/e_os2.h +fips_standalone_sha1.o: ../../include/openssl/opensslconf.h +fips_standalone_sha1.o: ../../include/openssl/sha.h fips_standalone_sha1.c diff --git a/test/Makefile.ssl b/test/Makefile.ssl index a9d06d4840..764b2f6ca1 100644 --- a/test/Makefile.ssl +++ b/test/Makefile.ssl @@ -53,6 +53,7 @@ RC5TEST= rc5test BFTEST= bftest CASTTEST= casttest DESTEST= destest +FIPS_DESTEST= fips_desmovs RANDTEST= randtest FIPS_RANDTEST= fips_randtest DHTEST= dhtest @@ -69,7 +70,7 @@ TESTS= alltests EXE= $(BNTEST) $(ECTEST) $(IDEATEST) $(MD2TEST) $(MD4TEST) $(MD5TEST) $(HMACTEST) \ $(RC2TEST) $(RC4TEST) $(RC5TEST) \ - $(DESTEST) $(SHATEST) $(SHA1TEST) $(FIPS_SHA1TEST) $(MDC2TEST) $(RMDTEST) \ + $(DESTEST) $(FIPS_DESTEST) $(SHATEST) $(SHA1TEST) $(FIPS_SHA1TEST) $(MDC2TEST) $(RMDTEST) \ $(RANDTEST) $(FIPS_RANDTEST) $(DHTEST) $(ENGINETEST) \ $(BFTEST) $(CASTTEST) $(SSLTEST) $(EXPTEST) $(DSATEST) $(FIPS_DSATEST) $(RSATEST) \ $(EVPTEST) $(FIPS_AESTEST) @@ -79,14 +80,14 @@ EXE= $(BNTEST) $(ECTEST) $(IDEATEST) $(MD2TEST) $(MD4TEST) $(MD5TEST) $(HMACTES OBJ= $(BNTEST).o $(ECTEST).o $(IDEATEST).o $(MD2TEST).o $(MD4TEST).o $(MD5TEST).o \ $(HMACTEST).o \ $(RC2TEST).o $(RC4TEST).o $(RC5TEST).o \ - $(DESTEST).o $(SHATEST).o $(SHA1TEST).o $(FIPS_SHA1TEST).o $(MDC2TEST).o $(RMDTEST).o \ + $(DESTEST).o $(FIPS_DESTEST).o $(SHATEST).o $(SHA1TEST).o $(FIPS_SHA1TEST).o $(MDC2TEST).o $(RMDTEST).o \ $(RANDTEST).o $(FIPS_RANDTEST).o $(DHTEST).o $(ENGINETEST).o $(CASTTEST).o \ $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(FIPS_DSATEST).o $(EXPTEST).o $(RSATEST).o \ $(EVPTEST).o $(FIPS_AESTEST).o SRC= $(BNTEST).c $(ECTEST).c $(IDEATEST).c $(MD2TEST).c $(MD4TEST).c $(MD5TEST).c \ $(HMACTEST).c \ $(RC2TEST).c $(RC4TEST).c $(RC5TEST).c \ - $(DESTEST).c $(SHATEST).c $(SHA1TEST).c $(FIPS_SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \ + $(DESTEST).c $(FIPS_DESTEST).c $(SHATEST).c $(SHA1TEST).c $(FIPS_SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \ $(RANDTEST).c $(FIPS_RANDTEST).c $(DHTEST).c $(ENGINETEST).c $(CASTTEST).c \ $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(FIPS_DSATEST).c $(EXPTEST).c $(RSATEST).c \ $(EVPTEST).c $(FIPS_AESTEST).c @@ -309,7 +310,7 @@ $(FIPS_AESTEST): $(FIPS_AESTEST).o $(DLIBCRYPTO) fi $(RSATEST): $(RSATEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(RSATEST) $(CFLAGS) $(RSATEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -317,7 +318,7 @@ $(RSATEST): $(RSATEST).o $(DLIBCRYPTO) fi $(BNTEST): $(BNTEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -325,7 +326,7 @@ $(BNTEST): $(BNTEST).o $(DLIBCRYPTO) fi $(ECTEST): $(ECTEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(ECTEST) $(CFLAGS) $(ECTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -333,7 +334,7 @@ $(ECTEST): $(ECTEST).o $(DLIBCRYPTO) fi $(EXPTEST): $(EXPTEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(EXPTEST) $(CFLAGS) $(EXPTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -341,7 +342,7 @@ $(EXPTEST): $(EXPTEST).o $(DLIBCRYPTO) fi $(IDEATEST): $(IDEATEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(IDEATEST) $(CFLAGS) $(IDEATEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -349,7 +350,7 @@ $(IDEATEST): $(IDEATEST).o $(DLIBCRYPTO) fi $(MD2TEST): $(MD2TEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(MD2TEST) $(CFLAGS) $(MD2TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -357,7 +358,7 @@ $(MD2TEST): $(MD2TEST).o $(DLIBCRYPTO) fi $(SHATEST): $(SHATEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(SHATEST) $(CFLAGS) $(SHATEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -365,7 +366,7 @@ $(SHATEST): $(SHATEST).o $(DLIBCRYPTO) fi $(SHA1TEST): $(SHA1TEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(SHA1TEST) $(CFLAGS) $(SHA1TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -373,14 +374,14 @@ $(SHA1TEST): $(SHA1TEST).o $(DLIBCRYPTO) fi $(FIPS_SHA1TEST): $(FIPS_SHA1TEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(FIPS_SHA1TEST) $(CFLAGS) $(FIPS_SHA1TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ $(CC) -o $(FIPS_SHA1TEST) $(CFLAGS) $(FIPS_SHA1TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \ fi $(RMDTEST): $(RMDTEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(RMDTEST) $(CFLAGS) $(RMDTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -388,7 +389,7 @@ $(RMDTEST): $(RMDTEST).o $(DLIBCRYPTO) fi $(MDC2TEST): $(MDC2TEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -396,7 +397,7 @@ $(MDC2TEST): $(MDC2TEST).o $(DLIBCRYPTO) fi $(MD4TEST): $(MD4TEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(MD4TEST) $(CFLAGS) $(MD4TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -404,7 +405,7 @@ $(MD4TEST): $(MD4TEST).o $(DLIBCRYPTO) fi $(MD5TEST): $(MD5TEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -412,7 +413,7 @@ $(MD5TEST): $(MD5TEST).o $(DLIBCRYPTO) fi $(HMACTEST): $(HMACTEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(HMACTEST) $(CFLAGS) $(HMACTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -420,7 +421,7 @@ $(HMACTEST): $(HMACTEST).o $(DLIBCRYPTO) fi $(RC2TEST): $(RC2TEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(RC2TEST) $(CFLAGS) $(RC2TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -428,7 +429,7 @@ $(RC2TEST): $(RC2TEST).o $(DLIBCRYPTO) fi $(BFTEST): $(BFTEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(BFTEST) $(CFLAGS) $(BFTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -436,7 +437,7 @@ $(BFTEST): $(BFTEST).o $(DLIBCRYPTO) fi $(CASTTEST): $(CASTTEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(CASTTEST) $(CFLAGS) $(CASTTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -444,7 +445,7 @@ $(CASTTEST): $(CASTTEST).o $(DLIBCRYPTO) fi $(RC4TEST): $(RC4TEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(RC4TEST) $(CFLAGS) $(RC4TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -452,7 +453,7 @@ $(RC4TEST): $(RC4TEST).o $(DLIBCRYPTO) fi $(RC5TEST): $(RC5TEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(RC5TEST) $(CFLAGS) $(RC5TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -460,15 +461,23 @@ $(RC5TEST): $(RC5TEST).o $(DLIBCRYPTO) fi $(DESTEST): $(DESTEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(DESTEST) $(CFLAGS) $(DESTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ $(CC) -o $(DESTEST) $(CFLAGS) $(DESTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \ fi +$(FIPS_DESTEST): $(FIPS_DESTEST).o $(DLIBCRYPTO) + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ + $(CC) -o $(FIPS_DESTEST) $(CFLAGS) $(FIPS_DESTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(FIPS_DESTEST) $(CFLAGS) $(FIPS_DESTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \ + fi + $(RANDTEST): $(RANDTEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(RANDTEST) $(CFLAGS) $(RANDTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -476,14 +485,14 @@ $(RANDTEST): $(RANDTEST).o $(DLIBCRYPTO) fi $(FIPS_RANDTEST): $(FIPS_RANDTEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(FIPS_RANDTEST) $(CFLAGS) $(FIPS_RANDTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ $(CC) -o $(FIPS_RANDTEST) $(CFLAGS) $(FIPS_RANDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \ fi $(DHTEST): $(DHTEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(DHTEST) $(CFLAGS) $(DHTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -491,7 +500,7 @@ $(DHTEST): $(DHTEST).o $(DLIBCRYPTO) fi $(DSATEST): $(DSATEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(DSATEST) $(CFLAGS) $(DSATEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -499,14 +508,14 @@ $(DSATEST): $(DSATEST).o $(DLIBCRYPTO) fi $(FIPS_DSATEST): $(FIPS_DSATEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(FIPS_DSATEST) $(CFLAGS) $(FIPS_DSATEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ $(CC) -o $(FIPS_DSATEST) $(CFLAGS) $(FIPS_DSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \ fi $(METHTEST): $(METHTEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(METHTEST) $(CFLAGS) $(METHTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -514,7 +523,7 @@ $(METHTEST): $(METHTEST).o $(DLIBCRYPTO) fi $(SSLTEST): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(DLIBSSL) $(LIBKRB5) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -522,7 +531,7 @@ $(SSLTEST): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO) fi $(ENGINETEST): $(ENGINETEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(ENGINETEST) $(CFLAGS) $(ENGINETEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -530,7 +539,7 @@ $(ENGINETEST): $(ENGINETEST).o $(DLIBCRYPTO) fi $(EVPTEST): $(EVPTEST).o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o $(EVPTEST) $(CFLAGS) $(EVPTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -541,7 +550,7 @@ $(EVPTEST): $(EVPTEST).o $(DLIBCRYPTO) # $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c #$(AESTEST): $(AESTEST).o $(DLIBCRYPTO) -# if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ +# if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ # $(CC) -o $(AESTEST) $(CFLAGS) $(AESTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ # else \ # LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -549,7 +558,7 @@ $(EVPTEST): $(EVPTEST).o $(DLIBCRYPTO) # fi dummytest: dummytest.o $(DLIBCRYPTO) - if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" -o "$(SHLIB_TARGET)" = "" ] ; then \ $(CC) -o dummytest $(CFLAGS) dummytest.o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \ else \ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ @@ -671,6 +680,25 @@ fips_aesavs.o: ../include/openssl/rsa.h ../include/openssl/safestack.h fips_aesavs.o: ../include/openssl/sha.h ../include/openssl/stack.h fips_aesavs.o: ../include/openssl/symhacks.h ../include/openssl/ui.h fips_aesavs.o: ../include/openssl/ui_compat.h fips_aesavs.c +fips_desmovs.o: ../include/openssl/aes.h ../include/openssl/asn1.h +fips_desmovs.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +fips_desmovs.o: ../include/openssl/bn.h ../include/openssl/cast.h +fips_desmovs.o: ../include/openssl/crypto.h ../include/openssl/des.h +fips_desmovs.o: ../include/openssl/des_old.h ../include/openssl/dh.h +fips_desmovs.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +fips_desmovs.o: ../include/openssl/err.h ../include/openssl/evp.h +fips_desmovs.o: ../include/openssl/fips.h ../include/openssl/idea.h +fips_desmovs.o: ../include/openssl/lhash.h ../include/openssl/md2.h +fips_desmovs.o: ../include/openssl/md4.h ../include/openssl/md5.h +fips_desmovs.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +fips_desmovs.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +fips_desmovs.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +fips_desmovs.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +fips_desmovs.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +fips_desmovs.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +fips_desmovs.o: ../include/openssl/sha.h ../include/openssl/stack.h +fips_desmovs.o: ../include/openssl/symhacks.h ../include/openssl/ui.h +fips_desmovs.o: ../include/openssl/ui_compat.h fips_desmovs.c fips_dsatest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h fips_dsatest.o: ../include/openssl/bn.h ../include/openssl/crypto.h fips_dsatest.o: ../include/openssl/des.h ../include/openssl/des_old.h diff --git a/util/libeay.num b/util/libeay.num index c0fe45a73e..6ad7e914ec 100755 --- a/util/libeay.num +++ b/util/libeay.num @@ -2801,9 +2801,9 @@ BIO_indent 3242 EXIST::FUNCTION: BUF_strlcpy 3243 EXIST::FUNCTION: OpenSSLDie 3244 EXIST::FUNCTION: OPENSSL_cleanse 3245 EXIST::FUNCTION: -EVP_cast5_cfb64 3246 EXIST::FUNCTION:CAST -EVP_aes_128_cfb8 3247 EXIST::FUNCTION:AES -ENGINE_setup_bsd_cryptodev 3248 EXIST:__FreeBSD__:FUNCTION:ENGINE +ENGINE_setup_bsd_cryptodev 3246 EXIST:__FreeBSD__:FUNCTION:ENGINE +EVP_cast5_cfb64 3247 EXIST::FUNCTION:CAST +EVP_aes_128_cfb8 3248 EXIST::FUNCTION:AES EVP_aes_256_cfb128 3249 EXIST::FUNCTION:AES EVP_des_ede3_cfb64 3250 EXIST::FUNCTION:DES EVP_aes_128_cfb1 3251 EXIST::FUNCTION:AES