From d83dde61803f03646c6dd41a1b764258898fe2de Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Tue, 16 Sep 2008 21:44:57 +0000 Subject: [PATCH] Merge changes to build system from fips branch. --- Configure | 173 +++++++++++++++++++++++++++++++-------- Makefile.org | 147 +++++++++++++++++++++++++++++++-- crypto/Makefile | 6 +- crypto/aes/Makefile | 2 +- crypto/asn1/Makefile | 2 +- crypto/bf/Makefile | 2 +- crypto/bio/Makefile | 2 +- crypto/bn/Makefile | 2 +- crypto/buffer/Makefile | 2 +- crypto/camellia/Makefile | 2 +- crypto/cast/Makefile | 2 +- crypto/cms/Makefile | 2 +- crypto/comp/Makefile | 2 +- crypto/conf/Makefile | 2 +- crypto/des/Makefile | 2 +- crypto/dh/Makefile | 2 +- crypto/dsa/Makefile | 2 +- crypto/dso/Makefile | 2 +- crypto/ec/Makefile | 2 +- crypto/ecdh/Makefile | 2 +- crypto/ecdsa/Makefile | 2 +- crypto/engine/Makefile | 2 +- crypto/err/Makefile | 2 +- crypto/evp/Makefile | 2 +- crypto/hmac/Makefile | 2 +- crypto/idea/Makefile | 2 +- crypto/krb5/Makefile | 2 +- crypto/lhash/Makefile | 2 +- crypto/md2/Makefile | 2 +- crypto/md4/Makefile | 2 +- crypto/md5/Makefile | 2 +- crypto/mdc2/Makefile | 2 +- crypto/objects/Makefile | 2 +- crypto/ocsp/Makefile | 2 +- crypto/pem/Makefile | 2 +- crypto/pkcs12/Makefile | 2 +- crypto/pkcs7/Makefile | 2 +- crypto/pqueue/Makefile | 2 +- crypto/rand/Makefile | 2 +- crypto/rc2/Makefile | 2 +- crypto/rc4/Makefile | 2 +- crypto/rc5/Makefile | 2 +- crypto/ripemd/Makefile | 2 +- crypto/rsa/Makefile | 2 +- crypto/seed/Makefile | 2 +- crypto/sha/Makefile | 2 +- crypto/stack/Makefile | 2 +- crypto/store/Makefile | 2 +- crypto/txt_db/Makefile | 2 +- crypto/ui/Makefile | 2 +- crypto/x509/Makefile | 2 +- crypto/x509v3/Makefile | 2 +- fips/sha/Makefile | 2 - util/arx.pl | 15 ++++ 54 files changed, 348 insertions(+), 93 deletions(-) create mode 100644 util/arx.pl diff --git a/Configure b/Configure index f24d738feb..b91cd237b2 100755 --- a/Configure +++ b/Configure @@ -6,7 +6,9 @@ eval 'exec perl -S $0 ${1+"$@"}' ## require 5.000; -use strict; +eval 'use strict;'; + +print STDERR "Warning: perl module strict not found.\n" if ($@); # see INSTALL for instructions. @@ -577,6 +579,11 @@ my $prefix=""; my $openssldir=""; my $exe_ext=""; my $install_prefix=""; +my $fipslibdir="/usr/local/ssl/fips-1.0/lib/"; +my $nofipscanistercheck=0; +my $fipsdso=0; +my $fipscanisterinternal="n"; +my $baseaddr="0xFB00000"; my $no_threads=0; my $threads=0; my $no_shared=0; # but "no-shared" is default @@ -600,6 +607,7 @@ my $rc2 ="crypto/rc2/rc2.h"; my $bf ="crypto/bf/bf_locl.h"; my $bn_asm ="bn_asm.o"; my $des_enc="des_enc.o fcrypt_b.o"; +my $fips_des_enc="fips_des_enc.o"; my $aes_enc="aes_core.o aes_cbc.o"; my $bf_enc ="bf_enc.o"; my $cast_enc="c_enc.o"; @@ -611,6 +619,7 @@ my $rmd160_obj=""; my $processor=""; my $default_ranlib; my $perl; +my $fips=0; # All of the following is disabled by default (RC5 was enabled before 0.9.8): @@ -739,12 +748,36 @@ PROCESS_ARGS: } elsif (/^386$/) { $processor=386; } + elsif (/^fips$/) + { + $fips=1; + } elsif (/^rsaref$/) { # No RSAref support any more since it's not needed. # The check for the option is there so scripts aren't # broken } + elsif (/^nofipscanistercheck$/) + { + $fips = 1; + $nofipscanistercheck = 1; + } + elsif (/^fipscanisterbuild$/) + { + $fips = 1; + $nofipscanistercheck = 1; + $fipslibdir=""; + $fipscanisterinternal="y"; + } + elsif (/^fipsdso$/) + { + $fips = 1; + $nofipscanistercheck = 1; + $fipslibdir=""; + $fipscanisterinternal="y"; + $fipsdso = 1; + } elsif (/^[-+]/) { if (/^-[lL](.*)$/) @@ -779,6 +812,14 @@ PROCESS_ARGS: { $withargs{"zlib-include"}="-I$1"; } + elsif (/^--with-fipslibdir=(.*)$/) + { + $fipslibdir="$1/"; + } + elsif (/^--with-baseaddr=(.*)$/) + { + $baseaddr="$1"; + } else { print STDERR $usage; @@ -886,6 +927,41 @@ print "Configuring for $target\n"; &usage if (!defined($table{$target})); +my @fields = split(/\s*:\s*/,$table{$target} . ":" x 30 , -1); +my $cc = $fields[$idx_cc]; +my $cflags = $fields[$idx_cflags]; +my $unistd = $fields[$idx_unistd]; +my $thread_cflag = $fields[$idx_thread_cflag]; +my $sys_id = $fields[$idx_sys_id]; +my $lflags = $fields[$idx_lflags]; +my $bn_ops = $fields[$idx_bn_ops]; +my $cpuid_obj = $fields[$idx_cpuid_obj]; +my $bn_obj = $fields[$idx_bn_obj]; +my $des_obj = $fields[$idx_des_obj]; +my $aes_obj = $fields[$idx_aes_obj]; +my $bf_obj = $fields[$idx_bf_obj]; +my $md5_obj = $fields[$idx_md5_obj]; +my $sha1_obj = $fields[$idx_sha1_obj]; +my $cast_obj = $fields[$idx_cast_obj]; +my $rc4_obj = $fields[$idx_rc4_obj]; +my $rmd160_obj = $fields[$idx_rmd160_obj]; +my $rc5_obj = $fields[$idx_rc5_obj]; +my $dso_scheme = $fields[$idx_dso_scheme]; +my $shared_target = $fields[$idx_shared_target]; +my $shared_cflag = $fields[$idx_shared_cflag]; +my $shared_ldflag = $fields[$idx_shared_ldflag]; +my $shared_extension = $fields[$idx_shared_extension]; +my $ranlib = $fields[$idx_ranlib]; +my $arflags = $fields[$idx_arflags]; + +if ($fips) + { + delete $disabled{"shared"} if ($disabled{"shared"} eq "default"); + $disabled{"asm"}="forced" + if ($target !~ "VC\-.*" && + "$cpuid_obj:$bn_obj:$aes_obj:$des_obj:$sha1_obj" eq "::::"); + } + foreach (sort (keys %disabled)) { @@ -949,10 +1025,22 @@ my $IsMK1MF=scalar grep /^$target$/,@MK1MF_Builds; $IsMK1MF=1 if ($target eq "mingw" && $^O ne "cygwin" && !is_msys()); +$no_shared = 0 if ($fipsdso && !$IsMK1MF); + $exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target eq "mingw"); $exe_ext=".nlm" if ($target =~ /netware/); $exe_ext=".pm" if ($target =~ /vos/); -$openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq ""); +if ($openssldir eq "" and $prefix eq "") + { + if ($fips) + { + $openssldir="/usr/local/ssl/fips"; + } + else + { + $openssldir="/usr/local/ssl"; + } + } $prefix=$openssldir if $prefix eq ""; $default_ranlib= &which("ranlib") or $default_ranlib="true"; @@ -968,33 +1056,6 @@ $openssldir=$prefix . "/" . $openssldir if $openssldir !~ /(^\/|^[a-zA-Z]:[\\\/] print "IsMK1MF=$IsMK1MF\n"; -my @fields = split(/\s*:\s*/,$table{$target} . ":" x 30 , -1); -my $cc = $fields[$idx_cc]; -my $cflags = $fields[$idx_cflags]; -my $unistd = $fields[$idx_unistd]; -my $thread_cflag = $fields[$idx_thread_cflag]; -my $sys_id = $fields[$idx_sys_id]; -my $lflags = $fields[$idx_lflags]; -my $bn_ops = $fields[$idx_bn_ops]; -my $cpuid_obj = $fields[$idx_cpuid_obj]; -my $bn_obj = $fields[$idx_bn_obj]; -my $des_obj = $fields[$idx_des_obj]; -my $aes_obj = $fields[$idx_aes_obj]; -my $bf_obj = $fields[$idx_bf_obj]; -my $md5_obj = $fields[$idx_md5_obj]; -my $sha1_obj = $fields[$idx_sha1_obj]; -my $cast_obj = $fields[$idx_cast_obj]; -my $rc4_obj = $fields[$idx_rc4_obj]; -my $rmd160_obj = $fields[$idx_rmd160_obj]; -my $rc5_obj = $fields[$idx_rc5_obj]; -my $dso_scheme = $fields[$idx_dso_scheme]; -my $shared_target = $fields[$idx_shared_target]; -my $shared_cflag = $fields[$idx_shared_cflag]; -my $shared_ldflag = $fields[$idx_shared_ldflag]; -my $shared_extension = $fields[$idx_shared_extension]; -my $ranlib = $fields[$idx_ranlib]; -my $arflags = $fields[$idx_arflags]; - # '%' in $lflags is used to split flags to "pre-" and post-flags my ($prelflags,$postlflags)=split('%',$lflags); if (defined($postlflags)) { $lflags=$postlflags; } @@ -1128,6 +1189,8 @@ if ($no_asm) { $cpuid_obj=$bn_obj=$des_obj=$aes_obj=$bf_obj=$cast_obj=$rc4_obj=$rc5_obj=""; $sha1_obj=$md5_obj=$rmd160_obj=""; + $cflags=~s/\-D[BL]_ENDIAN// if ($fips); + $thread_cflags=~s/\-D[BL]_ENDIAN// if ($fips); } if ($montasm) { @@ -1166,7 +1229,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) @@ -1255,8 +1318,14 @@ $bn_obj = $bn_asm unless $bn_obj ne ""; # bn86* is the only one implementing bn_*_part_words $cflags.=" -DOPENSSL_BN_ASM_PART_WORDS" if ($bn_obj =~ /bn86/); $cflags.=" -DOPENSSL_IA32_SSE2" if (!$no_sse2 && $bn_obj =~ /bn86/); + $cflags.=" -DOPENSSL_BN_ASM_MONT" if ($bn_obj =~ /\-mont|mo86\-/); +if ($fips) + { + $openssl_other_defines.="#define OPENSSL_FIPS\n"; + } + $des_obj=$des_enc unless ($des_obj =~ /\.o$/); $bf_obj=$bf_enc unless ($bf_obj =~ /\.o$/); $cast_obj=$cast_enc unless ($cast_obj =~ /\.o$/); @@ -1385,9 +1454,24 @@ while () s/^LIBKRB5=.*/LIBKRB5=$withargs{"krb5-lib"}/; s/^LIBZLIB=.*/LIBZLIB=$withargs{"zlib-lib"}/; s/^ZLIB_INCLUDE=.*/ZLIB_INCLUDE=$withargs{"zlib-include"}/; + s/^FIPSLIBDIR=.*/FIPSLIBDIR=$fipslibdir/; + if ($fipsdso) + { + s/^FIPSCANLIB=.*/FIPSCANLIB=libfips/; + s/^SHARED_FIPS=.*/SHARED_FIPS=libfips\$(SHLIB_EXT)/; + s/^SHLIBDIRS=.*/SHLIBDIRS= crypto ssl fips/; + } + else + { + s/^FIPSCANLIB=.*/FIPSCANLIB=libcrypto/ if $fips; + s/^SHARED_FIPS=.*/SHARED_FIPS=/; + s/^SHLIBDIRS=.*/SHLIBDIRS= crypto ssl/; + } + s/^FIPSCANISTERINTERNAL=.*/FIPSCANISTERINTERNAL=$fipscanisterinternal/; + s/^BASEADDR=.*/BASEADDR=$baseaddr/; s/^SHLIB_TARGET=.*/SHLIB_TARGET=$shared_target/; s/^SHLIB_MARK=.*/SHLIB_MARK=$shared_mark/; - s/^SHARED_LIBS=.*/SHARED_LIBS=\$(SHARED_CRYPTO) \$(SHARED_SSL)/ if (!$no_shared); + s/^SHARED_LIBS=.*/SHARED_LIBS=\$(SHARED_FIPS) \$(SHARED_CRYPTO) \$(SHARED_SSL)/ if (!$no_shared); if ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*$/) { my $sotmp = $1; @@ -1682,9 +1766,16 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN +#if defined(FIPS) + VALUE "Comments", "WARNING: TEST VERSION ONLY ***NOT*** FIPS 140-2 VALIDATED.\\0" +#endif // Required: VALUE "CompanyName", "The OpenSSL Project, http://www.openssl.org/\\0" +#if defined(FIPS) + VALUE "FileDescription", "TEST UNVALIDATED FIPS140-2 DLL\\0" +#else VALUE "FileDescription", "OpenSSL Shared Library\\0" +#endif VALUE "FileVersion", "$version\\0" #if defined(CRYPTO) VALUE "InternalName", "libeay32\\0" @@ -1692,12 +1783,15 @@ BEGIN #elif defined(SSL) VALUE "InternalName", "ssleay32\\0" VALUE "OriginalFilename", "ssleay32.dll\\0" +#elif defined(FIPS) + VALUE "InternalName", "libosslfips\\0" + VALUE "OriginalFilename", "libosslfips.dll\\0" #endif VALUE "ProductName", "The OpenSSL Toolkit\\0" VALUE "ProductVersion", "$version\\0" // Optional: //VALUE "Comments", "\\0" - VALUE "LegalCopyright", "Copyright © 1998-2005 The OpenSSL Project. Copyright © 1995-1998 Eric A. Young, Tim J. Hudson. All rights reserved.\\0" + VALUE "LegalCopyright", "Copyright © 1998-2007 The OpenSSL Project. Copyright © 1995-1998 Eric A. Young, Tim J. Hudson. All rights reserved.\\0" //VALUE "LegalTrademarks", "\\0" //VALUE "PrivateBuild", "\\0" //VALUE "SpecialBuild", "\\0" @@ -1734,6 +1828,21 @@ libraries on this platform, they will at least look at it and try their best (but please first make sure you have tried with a current version of OpenSSL). EOF +print <<\EOF if ($fipscanisterinternal eq "y"); + +WARNING: OpenSSL has been configured using unsupported option(s) to internally +generate a fipscanister.o object module for TESTING PURPOSES ONLY; that +compiled module is NOT FIPS 140-2 validated and CANNOT be used to replace the +OpenSSL FIPS Object Module as identified by the CMVP +(http://csrc.nist.gov/cryptval/) in any application requiring the use of FIPS +140-2 validated software. + +This is an OpenSSL 0.9.8-fips test version. + +See the file README.FIPS for details of how to build a test library. + +EOF + exit(0); sub usage diff --git a/Makefile.org b/Makefile.org index 22b1699257..f7bbb61fdd 100644 --- a/Makefile.org +++ b/Makefile.org @@ -65,6 +65,7 @@ EX_LIBS= EXE_EXT= ARFLAGS= AR=ar $(ARFLAGS) r +ARD=ar $(ARFLAGS) d RANLIB= ranlib PERL= perl TAR= tar @@ -104,8 +105,34 @@ LIBKRB5= ZLIB_INCLUDE= LIBZLIB= -DIRS= crypto ssl engines apps test tools -SHLIBDIRS= crypto ssl +# This is the location of fipscanister.o and friends. +# The FIPS module build will place it $(INSTALLTOP)/lib +# but since $(INSTALLTOP) can only take the default value +# when the module is built it will be in /usr/local/ssl/lib +# $(INSTALLTOP) for this build make be different so hard +# code the path. + +FIPSLIBDIR=/usr/local/ssl/lib/ + +# This is set to "y" if fipscanister.o is compiled internally as +# opposed to coming from an external validated location. + +FIPSCANISTERINTERNAL=n + +# The location of the library which contains fipscanister.o +# normally it will be libcrypto unless fipsdso is set in which +# case it will be libfips. If not compiling in FIPS mode at all +# this is empty making it a useful test for a FIPS compile. + +FIPSCANLIB= + +# Shared library base address. Currently only used on Windows. +# + +BASEADDR= + +DIRS= crypto fips ssl engines apps test tools +SHLIBDIRS= crypto ssl fips # dirs in crypto to build SDIRS= \ @@ -138,6 +165,7 @@ WDIRS= windows LIBS= libcrypto.a libssl.a SHARED_CRYPTO=libcrypto$(SHLIB_EXT) SHARED_SSL=libssl$(SHLIB_EXT) +SHARED_FIPS= SHARED_LIBS= SHARED_LIBS_LINK_EXTS= SHARED_LDFLAGS= @@ -191,6 +219,9 @@ BUILDENV= PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \ SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' \ MD5_ASM_OBJ='${MD5_ASM_OBJ}' \ RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' \ + FIPSLIBDIR='${FIPSLIBDIR}' FIPSCANLIB='${FIPSCANLIB}' \ + FIPSCANISTERINTERNAL='${FIPSCANISTERINTERNAL}' \ + FIPS_EX_OBJ='${FIPS_EX_OBJ}' \ THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES= # MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors, # which in turn eliminates ambiguities in variable treatment with -e. @@ -222,13 +253,84 @@ BUILD_ONE_CMD=\ reflect: @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV) +FIPS_EX_OBJ= ../crypto/aes/aes_cfb.o \ + ../crypto/aes/aes_ecb.o \ + ../crypto/aes/aes_ofb.o \ + ../crypto/bn/bn_add.o \ + ../crypto/bn/bn_blind.o \ + ../crypto/bn/bn_ctx.o \ + ../crypto/bn/bn_div.o \ + ../crypto/bn/bn_exp2.o \ + ../crypto/bn/bn_exp.o \ + ../crypto/bn/bn_gcd.o \ + ../crypto/bn/bn_lib.o \ + ../crypto/bn/bn_mod.o \ + ../crypto/bn/bn_mont.o \ + ../crypto/bn/bn_mul.o \ + ../crypto/bn/bn_prime.o \ + ../crypto/bn/bn_rand.o \ + ../crypto/bn/bn_recp.o \ + ../crypto/bn/bn_shift.o \ + ../crypto/bn/bn_sqr.o \ + ../crypto/bn/bn_word.o \ + ../crypto/bn/bn_x931p.o \ + ../crypto/buffer/buf_str.o \ + ../crypto/cryptlib.o \ + ../crypto/des/cfb64ede.o \ + ../crypto/des/cfb64enc.o \ + ../crypto/des/cfb_enc.o \ + ../crypto/des/ecb3_enc.o \ + ../crypto/des/ecb_enc.o \ + ../crypto/des/ofb64ede.o \ + ../crypto/des/ofb64enc.o \ + ../crypto/des/fcrypt.o \ + ../crypto/des/set_key.o \ + ../crypto/dsa/dsa_utl.o \ + ../crypto/dsa/dsa_sign.o \ + ../crypto/dsa/dsa_vrf.o \ + ../crypto/err/err.o \ + ../crypto/evp/digest.o \ + ../crypto/evp/enc_min.o \ + ../crypto/evp/e_aes.o \ + ../crypto/evp/e_des3.o \ + ../crypto/evp/p_sign.o \ + ../crypto/evp/p_verify.o \ + ../crypto/mem_clr.o \ + ../crypto/mem.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/rsa/rsa_lib.o \ + ../crypto/rsa/rsa_none.o \ + ../crypto/rsa/rsa_oaep.o \ + ../crypto/rsa/rsa_pk1.o \ + ../crypto/rsa/rsa_pss.o \ + ../crypto/rsa/rsa_ssl.o \ + ../crypto/rsa/rsa_x931.o \ + ../crypto/sha/sha1dgst.o \ + ../crypto/sha/sha256.o \ + ../crypto/sha/sha512.o \ + ../crypto/uid.o + sub_all: build_all build_all: build_libs build_apps build_tests build_tools -build_libs: build_crypto build_ssl build_engines +build_libs: build_crypto build_fips build_ssl build_shared build_engines build_crypto: - @dir=crypto; target=all; $(BUILD_ONE_CMD) + if [ -n "$(FIPSCANLIB)" ]; then \ + EXCL_OBJ='$(AES_ASM_OBJ) $(BN_ASM) $(DES_ENC) $(CPUID_OBJ) $(SHA1_ASM_OBJ) $(FIPS_EX_OBJ)' ; export EXCL_OBJ ; \ + ARX='$(PERL) $${TOP}/util/arx.pl $(AR)' ; \ + else \ + ARX='${AR}' ; \ + fi ; export ARX ; \ + dir=crypto; target=all; $(BUILD_ONE_CMD) +build_fips: + @dir=fips; target=all; [ -z "$(FIPSCANLIB)" ] || $(BUILD_ONE_CMD) build_ssl: @dir=ssl; target=all; $(BUILD_ONE_CMD) build_engines: @@ -244,9 +346,20 @@ all_testapps: build_libs build_testapps build_testapps: @dir=crypto; target=testapps; $(BUILD_ONE_CMD) -libcrypto$(SHLIB_EXT): libcrypto.a +build_shared: $(SHARED_LIBS) +libcrypto$(SHLIB_EXT): libcrypto.a $(SHARED_FIPS) @if [ "$(SHLIB_TARGET)" != "" ]; then \ - $(MAKE) SHLIBDIRS=crypto build-shared; \ + if [ "$(FIPSCANLIB)" = "libfips" ]; then \ + $(ARD) libcrypto.a fipscanister.o ; \ + $(MAKE) SHLIBDIRS='crypto' SHLIBDEPS='-lfips' build-shared; \ + $(AR) libcrypto.a fips/fipscanister.o ; \ + else \ + if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \ + FIPSLD_CC=$(CC); CC=fips/fipsld; \ + export CC FIPSLD_CC; \ + fi; \ + $(MAKE) -e SHLIBDIRS='crypto' build-shared; \ + fi \ else \ echo "There's no support for shared libraries on this platform" >&2; \ exit 1; \ @@ -254,12 +367,32 @@ libcrypto$(SHLIB_EXT): libcrypto.a libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a @if [ "$(SHLIB_TARGET)" != "" ]; then \ - $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \ + shlibdeps=-lcrypto; \ + [ "$(FIPSCANLIB)" = "libfips" ] && shlibdeps="$$shlibdeps -lfips"; \ + $(MAKE) SHLIBDIRS=ssl SHLIBDEPS="$$shlibdeps" build-shared; \ + else \ + echo "There's no support for shared libraries on this platform" >&2 ; \ + exit 1; \ + fi + +fips/fipscanister.o: build_fips +libfips$(SHLIB_EXT): fips/fipscanister.o + @if [ "$(SHLIB_TARGET)" != "" ]; then \ + FIPSLD_CC=$(CC); CC=fips/fipsld; export CC FIPSLD_CC; \ + $(MAKE) -f Makefile.shared -e $(BUILDENV) \ + CC=$${CC} LIBNAME=fips THIS=$@ \ + LIBEXTRAS=fips/fipscanister.o \ + LIBDEPS="$(EX_LIBS)" \ + LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \ + link_o.$(SHLIB_TARGET) || { rm -f $@; exit 1; } \ else \ echo "There's no support for shared libraries on this platform" >&2; \ exit 1; \ fi +libfips.a: + dir=fips; target=all; $(BUILD_ONE_CMD) + clean-shared: @set -e; for i in $(SHLIBDIRS); do \ if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \ diff --git a/crypto/Makefile b/crypto/Makefile index 29e2b04b27..0107227d3a 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -33,8 +33,8 @@ GENERAL=Makefile README crypto-lib.com install.com LIB= $(TOP)/libcrypto.a SHARED_LIB= libcrypto$(SHLIB_EXT) -LIBSRC= cryptlib.c dyn_lck.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c o_time.c o_str.c o_dir.c -LIBOBJ= cryptlib.o dyn_lck.o mem.o mem_clr.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o o_time.o o_str.o o_dir.o $(CPUID_OBJ) +LIBSRC= cryptlib.c dyn_lck.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c o_time.c o_str.c o_dir.c o_init.c fips_err.c +LIBOBJ= cryptlib.o dyn_lck.o mem.o mem_clr.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o o_time.o o_str.o o_dir.o o_init.o fips_err.o $(CPUID_OBJ) SRC= $(LIBSRC) @@ -98,7 +98,7 @@ links: lib: $(LIB) @touch lib $(LIB): $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. shared: buildinf.h lib subdirs diff --git a/crypto/aes/Makefile b/crypto/aes/Makefile index 22c7203dbb..5864350089 100644 --- a/crypto/aes/Makefile +++ b/crypto/aes/Makefile @@ -41,7 +41,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/asn1/Makefile b/crypto/asn1/Makefile index 63066899d0..f206750d06 100644 --- a/crypto/asn1/Makefile +++ b/crypto/asn1/Makefile @@ -63,7 +63,7 @@ pk: pk.c all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/bf/Makefile b/crypto/bf/Makefile index 8441954a8d..d898fe5403 100644 --- a/crypto/bf/Makefile +++ b/crypto/bf/Makefile @@ -40,7 +40,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/bio/Makefile b/crypto/bio/Makefile index 1ef6c2fb9f..1cd76ce7a2 100644 --- a/crypto/bio/Makefile +++ b/crypto/bio/Makefile @@ -45,7 +45,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/bn/Makefile b/crypto/bn/Makefile index fcfc78f6af..911f1e8b5e 100644 --- a/crypto/bn/Makefile +++ b/crypto/bn/Makefile @@ -58,7 +58,7 @@ bnbug: bnbug.c ../../libcrypto.a top cc -g -I../../include bnbug.c -o bnbug ../../libcrypto.a lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/buffer/Makefile b/crypto/buffer/Makefile index d0e0d5f896..5847d27340 100644 --- a/crypto/buffer/Makefile +++ b/crypto/buffer/Makefile @@ -33,7 +33,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/camellia/Makefile b/crypto/camellia/Makefile index 1579de5ce5..dfb12951fd 100644 --- a/crypto/camellia/Makefile +++ b/crypto/camellia/Makefile @@ -41,7 +41,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/cast/Makefile b/crypto/cast/Makefile index 149956ee90..6e9c4903f7 100644 --- a/crypto/cast/Makefile +++ b/crypto/cast/Makefile @@ -38,7 +38,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/cms/Makefile b/crypto/cms/Makefile index e39c310b6c..1c137e0cff 100644 --- a/crypto/cms/Makefile +++ b/crypto/cms/Makefile @@ -37,7 +37,7 @@ test: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/comp/Makefile b/crypto/comp/Makefile index efda832dce..5d364b8513 100644 --- a/crypto/comp/Makefile +++ b/crypto/comp/Makefile @@ -36,7 +36,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/conf/Makefile b/crypto/conf/Makefile index 78bb324106..c00e818853 100644 --- a/crypto/conf/Makefile +++ b/crypto/conf/Makefile @@ -36,7 +36,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/des/Makefile b/crypto/des/Makefile index a13ecef96c..1af2dde9f5 100644 --- a/crypto/des/Makefile +++ b/crypto/des/Makefile @@ -54,7 +54,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/dh/Makefile b/crypto/dh/Makefile index 950cad9c5b..4fae54fb39 100644 --- a/crypto/dh/Makefile +++ b/crypto/dh/Makefile @@ -33,7 +33,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/dsa/Makefile b/crypto/dsa/Makefile index e78fb65d23..3679a0e74b 100644 --- a/crypto/dsa/Makefile +++ b/crypto/dsa/Makefile @@ -35,7 +35,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/dso/Makefile b/crypto/dso/Makefile index 07f5d8d159..52f152888c 100644 --- a/crypto/dso/Makefile +++ b/crypto/dso/Makefile @@ -35,7 +35,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/ec/Makefile b/crypto/ec/Makefile index 42f7bb7fc8..b5bbc9faa1 100644 --- a/crypto/ec/Makefile +++ b/crypto/ec/Makefile @@ -38,7 +38,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/ecdh/Makefile b/crypto/ecdh/Makefile index 65d8904ee8..cc3daf7a42 100644 --- a/crypto/ecdh/Makefile +++ b/crypto/ecdh/Makefile @@ -34,7 +34,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/ecdsa/Makefile b/crypto/ecdsa/Makefile index 9b48d5641f..dba1667dc7 100644 --- a/crypto/ecdsa/Makefile +++ b/crypto/ecdsa/Makefile @@ -34,7 +34,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/engine/Makefile b/crypto/engine/Makefile index 47cc619b8a..97debc87c1 100644 --- a/crypto/engine/Makefile +++ b/crypto/engine/Makefile @@ -41,7 +41,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/err/Makefile b/crypto/err/Makefile index fc680e2f6a..16ab4c5fbb 100644 --- a/crypto/err/Makefile +++ b/crypto/err/Makefile @@ -33,7 +33,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/evp/Makefile b/crypto/evp/Makefile index 6c7e24582b..4e3231d018 100644 --- a/crypto/evp/Makefile +++ b/crypto/evp/Makefile @@ -55,7 +55,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/hmac/Makefile b/crypto/hmac/Makefile index 01f10c396f..60e5c3328d 100644 --- a/crypto/hmac/Makefile +++ b/crypto/hmac/Makefile @@ -33,7 +33,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/idea/Makefile b/crypto/idea/Makefile index b2e7add666..f35d38b194 100644 --- a/crypto/idea/Makefile +++ b/crypto/idea/Makefile @@ -33,7 +33,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/krb5/Makefile b/crypto/krb5/Makefile index 14077390d6..8efb9e8910 100644 --- a/crypto/krb5/Makefile +++ b/crypto/krb5/Makefile @@ -34,7 +34,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/lhash/Makefile b/crypto/lhash/Makefile index 82bddac474..35f0932971 100644 --- a/crypto/lhash/Makefile +++ b/crypto/lhash/Makefile @@ -33,7 +33,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/md2/Makefile b/crypto/md2/Makefile index 17f878aeb7..7098ca607e 100644 --- a/crypto/md2/Makefile +++ b/crypto/md2/Makefile @@ -33,7 +33,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/md4/Makefile b/crypto/md4/Makefile index ef97bb0cbe..fed2d806a4 100644 --- a/crypto/md4/Makefile +++ b/crypto/md4/Makefile @@ -34,7 +34,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/md5/Makefile b/crypto/md5/Makefile index ceb00e8956..c25ec4ecb9 100644 --- a/crypto/md5/Makefile +++ b/crypto/md5/Makefile @@ -38,7 +38,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/mdc2/Makefile b/crypto/mdc2/Makefile index 1d064f17a6..ea25688d88 100644 --- a/crypto/mdc2/Makefile +++ b/crypto/mdc2/Makefile @@ -33,7 +33,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/objects/Makefile b/crypto/objects/Makefile index 9c5615099c..25e8b23b5d 100644 --- a/crypto/objects/Makefile +++ b/crypto/objects/Makefile @@ -34,7 +34,7 @@ top: all: obj_dat.h lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/ocsp/Makefile b/crypto/ocsp/Makefile index 0fe028960e..4c3eb35059 100644 --- a/crypto/ocsp/Makefile +++ b/crypto/ocsp/Makefile @@ -36,7 +36,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/pem/Makefile b/crypto/pem/Makefile index 742194fd24..6df96924c0 100644 --- a/crypto/pem/Makefile +++ b/crypto/pem/Makefile @@ -36,7 +36,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/pkcs12/Makefile b/crypto/pkcs12/Makefile index 3a7498fe7a..5ace911690 100644 --- a/crypto/pkcs12/Makefile +++ b/crypto/pkcs12/Makefile @@ -39,7 +39,7 @@ test: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/pkcs7/Makefile b/crypto/pkcs7/Makefile index 3f7e88b40f..1ae9fa492a 100644 --- a/crypto/pkcs7/Makefile +++ b/crypto/pkcs7/Makefile @@ -54,7 +54,7 @@ verify: verify.o example.o lib $(CC) $(CFLAGS) -o verify verify.o $(PEX_LIBS) example.o $(LIB) $(EX_LIBS) lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/pqueue/Makefile b/crypto/pqueue/Makefile index d0c39d25ce..36bfc349aa 100644 --- a/crypto/pqueue/Makefile +++ b/crypto/pqueue/Makefile @@ -33,7 +33,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/rand/Makefile b/crypto/rand/Makefile index 665020da4c..e35ada57f4 100644 --- a/crypto/rand/Makefile +++ b/crypto/rand/Makefile @@ -35,7 +35,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/rc2/Makefile b/crypto/rc2/Makefile index 73eac347e7..b888c4c9bc 100644 --- a/crypto/rc2/Makefile +++ b/crypto/rc2/Makefile @@ -33,7 +33,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/rc4/Makefile b/crypto/rc4/Makefile index a9d5e02af0..3258735d58 100644 --- a/crypto/rc4/Makefile +++ b/crypto/rc4/Makefile @@ -37,7 +37,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/rc5/Makefile b/crypto/rc5/Makefile index efb0f36b59..b4e21c9bb2 100644 --- a/crypto/rc5/Makefile +++ b/crypto/rc5/Makefile @@ -40,7 +40,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/ripemd/Makefile b/crypto/ripemd/Makefile index d55875c20c..7e104025af 100644 --- a/crypto/ripemd/Makefile +++ b/crypto/ripemd/Makefile @@ -38,7 +38,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/rsa/Makefile b/crypto/rsa/Makefile index 908d8066a4..73377852b6 100644 --- a/crypto/rsa/Makefile +++ b/crypto/rsa/Makefile @@ -37,7 +37,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/seed/Makefile b/crypto/seed/Makefile index f9de27b288..ffaeb84218 100644 --- a/crypto/seed/Makefile +++ b/crypto/seed/Makefile @@ -34,7 +34,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/sha/Makefile b/crypto/sha/Makefile index ac64fb61d3..480f5c8bb0 100644 --- a/crypto/sha/Makefile +++ b/crypto/sha/Makefile @@ -38,7 +38,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/stack/Makefile b/crypto/stack/Makefile index 5327692ac8..489a77b93c 100644 --- a/crypto/stack/Makefile +++ b/crypto/stack/Makefile @@ -33,7 +33,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/store/Makefile b/crypto/store/Makefile index 0dcfd7857a..2d42517d16 100644 --- a/crypto/store/Makefile +++ b/crypto/store/Makefile @@ -35,7 +35,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/txt_db/Makefile b/crypto/txt_db/Makefile index e6f30331d8..87e57b49f6 100644 --- a/crypto/txt_db/Makefile +++ b/crypto/txt_db/Makefile @@ -33,7 +33,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/ui/Makefile b/crypto/ui/Makefile index a685659fb4..4755e206f6 100644 --- a/crypto/ui/Makefile +++ b/crypto/ui/Makefile @@ -37,7 +37,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/x509/Makefile b/crypto/x509/Makefile index ddcc3124a7..f0a6ca90f7 100644 --- a/crypto/x509/Makefile +++ b/crypto/x509/Makefile @@ -43,7 +43,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/crypto/x509v3/Makefile b/crypto/x509v3/Makefile index 556ef351bf..07e2df4368 100644 --- a/crypto/x509v3/Makefile +++ b/crypto/x509v3/Makefile @@ -43,7 +43,7 @@ top: all: lib lib: $(LIBOBJ) - $(AR) $(LIB) $(LIBOBJ) + $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib diff --git a/fips/sha/Makefile b/fips/sha/Makefile index ba8eb02baf..00b4cfa49d 100644 --- a/fips/sha/Makefile +++ b/fips/sha/Makefile @@ -23,7 +23,6 @@ CFLAGS= $(INCLUDES) $(CFLAG) GENERAL=Makefile TEST= fips_shatest.c -TESTDATA= SHAmix.req SHAmix.fax APPS= EXE= fips_standalone_sha1$(EXE_EXT) @@ -56,7 +55,6 @@ files: links: @$(PERL) $(TOP)/util/mklink.pl $(TOP)/include/openssl $(EXHEADER) @$(PERL) $(TOP)/util/mklink.pl $(TOP)/test $(TEST) - cp $(TESTDATA) $(TOP)/test @$(PERL) $(TOP)/util/mklink.pl $(TOP)/apps $(APPS) install: diff --git a/util/arx.pl b/util/arx.pl new file mode 100644 index 0000000000..ce62625c33 --- /dev/null +++ b/util/arx.pl @@ -0,0 +1,15 @@ +#!/bin/perl + +# Simple perl script to wrap round "ar" program and exclude any +# object files in the environment variable EXCL_OBJ + +map { s/^.*\/([^\/]*)$/$1/ ; $EXCL{$_} = 1} split(' ', $ENV{EXCL_OBJ}); + +#my @ks = keys %EXCL; +#print STDERR "Excluding: @ks \n"; + +my @ARGS = grep { !exists $EXCL{$_} } @ARGV; + +system @ARGS; + +exit $? >> 8; -- 2.25.1