X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=Makefile.fips;h=b3811dff22f16202466cf6b7d61effc6b7866e10;hp=7ed8a34f93cb8234385df7f1e6300cfe45fe9844;hb=4cfeb00be953cff10182772930adb7776860cfff;hpb=6892d0eb0315790b078eacb55d86bb568cdb2ee1 diff --git a/Makefile.fips b/Makefile.fips index 7ed8a34f93..b3811dff22 100644 --- a/Makefile.fips +++ b/Makefile.fips @@ -148,16 +148,15 @@ SHLIBDIRS= crypto SDIRS= \ sha hmac des aes modes \ bn ec rsa dsa ecdsa dh \ - buffer rand evp # ecdh cmac + buffer evp ecdh cmac # keep in mind that the above list is adjusted by ./Configure # according to no-xxx arguments... LINKDIRS= \ objects sha hmac des aes modes \ - bn ec rsa dsa ecdsa dh ecdh dso engine \ + bn ec rsa dsa ecdh cmac ecdsa dh engine \ buffer bio stack lhash rand err \ - evp asn1 pem x509 x509v3 pkcs7 ocsp ui krb5 \ - cmac + evp asn1 ui # tests to perform. "alltests" is a special word indicating that all tests # should be performed. @@ -187,7 +186,7 @@ SHARED_LDFLAGS= GENERAL= Makefile BASENAME= openssl NAME= $(BASENAME)-$(VERSION) -TARFILE= openssl-fips-test-2.0.tar +TARFILE= openssl-fips-2.0-test.tar WTARFILE= $(NAME)-win.tar EXHEADER= e_os2.h HEADER= e_os.h @@ -276,8 +275,6 @@ BUILD_ONE_CMD=\ reflect: @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV) -# FIXME - FIPS_EX_OBJ= ../crypto/aes/aes_cfb.o \ ../crypto/aes/aes_ecb.o \ ../crypto/aes/aes_ofb.o \ @@ -302,6 +299,7 @@ FIPS_EX_OBJ= ../crypto/aes/aes_cfb.o \ ../crypto/bn/bn_word.o \ ../crypto/bn/bn_x931p.o \ ../crypto/buffer/buf_str.o \ + ../crypto/cmac/cmac.o \ ../crypto/cryptlib.o \ ../crypto/des/cfb64ede.o \ ../crypto/des/cfb64enc.o \ @@ -326,23 +324,24 @@ FIPS_EX_OBJ= ../crypto/aes/aes_cfb.o \ ../crypto/ec/ecp_smpl.o \ ../crypto/ec/ec2_mult.o \ ../crypto/ec/ec2_smpl.o \ + ../crypto/ecdh/ech_key.o \ + ../crypto/ecdh/ech_ossl.o \ ../crypto/ecdsa/ecs_ossl.o \ ../crypto/evp/e_aes.o \ ../crypto/evp/e_des3.o \ + ../crypto/evp/e_null.o \ ../crypto/evp/m_sha1.o \ + ../crypto/evp/m_dss1.o \ + ../crypto/evp/m_dss.o \ + ../crypto/evp/m_ecdsa.o \ ../crypto/hmac/hmac.o \ ../crypto/modes/cbc128.o \ + ../crypto/modes/ccm128.o \ ../crypto/modes/cfb128.o \ ../crypto/modes/ctr128.o \ ../crypto/modes/gcm128.o \ ../crypto/modes/ofb128.o \ - ../crypto/rand/md_rand.o \ - ../crypto/rand/rand_egd.o \ - ../crypto/rand/randfile.o \ - ../crypto/rand/rand_lib.o \ - ../crypto/rand/rand_os2.o \ - ../crypto/rand/rand_unix.o \ - ../crypto/rand/rand_win.o \ + ../crypto/modes/xts128.o \ ../crypto/rsa/rsa_eay.o \ ../crypto/rsa/rsa_gen.o \ ../crypto/rsa/rsa_crpt.o \ @@ -360,7 +359,7 @@ FIPS_EX_OBJ= ../crypto/aes/aes_cfb.o \ ../crypto/uid.o sub_all: build_all -build_all: build_libs build_tests +build_all: build_libs build_libs: build_crypto build_fips @@ -388,6 +387,8 @@ build_apps: @dir=apps; target=all; $(BUILD_ONE_CMD) build_tests: @dir=test; target=fipsexe; $(BUILD_ONE_CMD) +build_algvs: + @dir=test; target=fipsalgvs; $(BUILD_ONE_CMD) build_tools: @dir=tools; target=all; $(BUILD_ONE_CMD) @@ -492,7 +493,7 @@ openssl.pc: Makefile echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \ echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc -Makefile: Makefile.org Configure config +Makefile: Makefile.fips Configure config @echo "Makefile is older than Makefile.org, Configure or config." @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please." @false @@ -523,8 +524,8 @@ files: links: @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER) - $(MAKE) -C fips links - SDIRS='$(LINKDIRS)' $(MAKE) -C crypto links + @set -e; dir=fips target=links; $(RECURSIVE_BUILD_CMD) + @(cd crypto ; SDIRS='$(LINKDIRS)' $(MAKE) -e links) gentests: @(cd test && echo "generating dummy tests (if needed)..." && \ @@ -537,15 +538,13 @@ dclean: test: tests tests: - @(cd test && echo "testing..." && \ - $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests ); - OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a + @echo "Not implemented in FIPS build" ; false report: @$(PERL) util/selftest.pl depend: - @set -e; target=depend; $(RECURSIVE_BUILD_CMD) + @echo make depend not supported ; false lint: @set -e; target=lint; $(RECURSIVE_BUILD_CMD) @@ -597,7 +596,7 @@ tar: find . -type d -print | xargs chmod 755 find . -type f -print | xargs chmod a+r find . -type f -perm -0100 -print | xargs chmod a+x - find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | $(BUILDENV) $(PERL) util/fipsdist.pl | sort > ../$(TARFILE).list; \ + find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | $(BUILDENV) LINKDIRS='$(LINKDIRS)' $(PERL) util/fipsdist.pl | sort > ../$(TARFILE).list; \ $(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \ tardy --user_number=0 --user_name=openssl \ --group_number=0 --group_name=openssl \ @@ -618,152 +617,22 @@ dist: $(PERL) Configure dist fipscanisteronly @$(MAKE) dist_pem_h @$(MAKE) SDIRS='$(SDIRS)' clean - @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' tar + @$(MAKE) -f Makefile.fips TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' tar dist_pem_h: (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean) -install: all install_docs install_sw +install: all install_sw install_sw: @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \ - $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \ - $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \ - $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \ - $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \ - $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \ - $(INSTALL_PREFIX)$(OPENSSLDIR)/private + $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\ do \ (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ done; @set -e; target=install; $(RECURSIVE_BUILD_CMD) - @set -e; for i in $(LIBS) ;\ - do \ - if [ -f "$$i" ]; then \ - ( echo installing $$i; \ - cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ - $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ - chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ - mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i ); \ - fi; \ - done; - @set -e; if [ -n "$(SHARED_LIBS)" ]; then \ - tmp="$(SHARED_LIBS)"; \ - for i in $${tmp:-x}; \ - do \ - if [ -f "$$i" -o -f "$$i.a" ]; then \ - ( echo installing $$i; \ - if [ "$(PLATFORM)" != "Cygwin" ]; then \ - cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ - chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ - mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ - else \ - c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \ - cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \ - chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \ - mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \ - cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ - chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ - mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ - fi ); \ - if expr $(PLATFORM) : 'mingw' > /dev/null; then \ - ( case $$i in \ - *crypto*) i=libeay32.dll;; \ - *ssl*) i=ssleay32.dll;; \ - esac; \ - 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 ); \ - fi; \ - fi; \ - done; \ - ( here="`pwd`"; \ - cd $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR); \ - $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \ - if [ "$(INSTALLTOP)" != "/usr" ]; then \ - echo 'OpenSSL shared libraries have been installed in:'; \ - echo ' $(INSTALLTOP)'; \ - echo ''; \ - sed -e '1,/^$$/d' doc/openssl-shared.txt; \ - fi; \ - fi - cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig - chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc - cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig - chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc - cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig - chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc - -install_html_docs: - here="`pwd`"; \ - for subdir in apps crypto ssl; do \ - mkdir -p $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \ - for i in doc/$$subdir/*.pod; do \ - fn=`basename $$i .pod`; \ - echo "installing html/$$fn.$(HTMLSUFFIX)"; \ - cat $$i \ - | sed -r 's/L<([^)]*)(\([0-9]\))?\|([^)]*)(\([0-9]\))?>/L<\1|\3>/g' \ - | pod2html --podroot=doc --htmlroot=.. --podpath=apps:crypto:ssl \ - | sed -r 's/ $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \ - $(PERL) util/extract-names.pl < $$i | \ - grep -v $$filecase "^$$fn\$$" | \ - (cd $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \ - while read n; do \ - PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$(HTMLSUFFIX) "$$n".$(HTMLSUFFIX); \ - done); \ - done; \ - done - -install_docs: - @$(PERL) $(TOP)/util/mkdir-p.pl \ - $(INSTALL_PREFIX)$(MANDIR)/man1 \ - $(INSTALL_PREFIX)$(MANDIR)/man3 \ - $(INSTALL_PREFIX)$(MANDIR)/man5 \ - $(INSTALL_PREFIX)$(MANDIR)/man7 - @pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \ - here="`pwd`"; \ - filecase=; \ - if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" -o "$(PLATFORM)" = "mingw" ]; then \ - filecase=-i; \ - fi; \ - set -e; for i in doc/apps/*.pod; do \ - fn=`basename $$i .pod`; \ - sec=`$(PERL) util/extract-section.pl 1 < $$i`; \ - echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \ - (cd `$(PERL) util/dirname.pl $$i`; \ - sh -c "$$pod2man \ - --section=$$sec --center=OpenSSL \ - --release=$(VERSION) `basename $$i`") \ - > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ - $(PERL) util/extract-names.pl < $$i | \ - (grep -v $$filecase "^$$fn\$$"; true) | \ - (grep -v "[ ]"; true) | \ - (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \ - while read n; do \ - PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \ - done); \ - done; \ - set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \ - fn=`basename $$i .pod`; \ - sec=`$(PERL) util/extract-section.pl 3 < $$i`; \ - echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \ - (cd `$(PERL) util/dirname.pl $$i`; \ - sh -c "$$pod2man \ - --section=$$sec --center=OpenSSL \ - --release=$(VERSION) `basename $$i`") \ - > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ - $(PERL) util/extract-names.pl < $$i | \ - (grep -v $$filecase "^$$fn\$$"; true) | \ - (grep -v "[ ]"; true) | \ - (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \ - while read n; do \ - PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \ - done); \ - done # DO NOT DELETE THIS LINE -- make depend depends on it.