Skip to content

Commit

Permalink
Backport single makefile from master.
Browse files Browse the repository at this point in the history
  • Loading branch information
benlaurie committed Jun 13, 2013
1 parent 933aee6 commit e887c41
Show file tree
Hide file tree
Showing 21 changed files with 730 additions and 211 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Expand Up @@ -10,10 +10,15 @@
# Top level excludes
/Makefile.bak
/Makefile
/MINFO
/*.a
/include
/*.pc
/rehash.time
/inc.*
/makefile.*
/out.*
/tmp.*

# Most *.c files under test/ are symlinks
/test/*.c
Expand Down
8 changes: 8 additions & 0 deletions GitConfigure
@@ -0,0 +1,8 @@
#!/bin/sh

BRANCH=`git rev-parse --abbrev-ref HEAD`

./Configure $@ no-symlinks
make files
util/mk1mf.pl OUT=out.$BRANCH TMP=tmp.$BRANCH INC=inc.$BRANCH copy > makefile.$BRANCH
make -f makefile.$BRANCH init
5 changes: 5 additions & 0 deletions GitMake
@@ -0,0 +1,5 @@
#!/bin/sh

BRANCH=`git rev-parse --abbrev-ref HEAD`

make -f makefile.$BRANCH $@
2 changes: 1 addition & 1 deletion crypto/Makefile
Expand Up @@ -89,7 +89,7 @@ subdirs:
@target=all; $(RECURSIVE_MAKE)

files:
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
$(PERL) $(TOP)/util/files.pl "CPUID_OBJ=$(CPUID_OBJ)" Makefile >> $(TOP)/MINFO
@target=files; $(RECURSIVE_MAKE)

links:
Expand Down
2 changes: 1 addition & 1 deletion crypto/aes/Makefile
Expand Up @@ -87,7 +87,7 @@ aes-%.S: asm/aes-%.pl; $(PERL) $< $(PERLASM_SCHEME) > $@
aes-armv4.o: aes-armv4.S

files:
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
$(PERL) $(TOP)/util/files.pl "AES_ENC=$(AES_ENC)" Makefile >> $(TOP)/MINFO

links:
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
Expand Down
2 changes: 1 addition & 1 deletion crypto/rc4/Makefile
Expand Up @@ -66,7 +66,7 @@ rc4-ia64.s: rc4-ia64.S
rc4-%.s: asm/rc4-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@

files:
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
$(PERL) $(TOP)/util/files.pl "RC4_ENC=$(RC4_ENC)" Makefile >> $(TOP)/MINFO

links:
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
Expand Down
3 changes: 3 additions & 0 deletions crypto/srp/Makefile
Expand Up @@ -37,6 +37,9 @@ lib: $(LIBOBJ)
$(RANLIB) $(LIB) || echo Never mind.
@touch lib

files:
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO

links:
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
Expand Down
3 changes: 1 addition & 2 deletions engines/ccgost/Makefile
Expand Up @@ -74,8 +74,7 @@ depend:
fi

files:


$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO

lint:
lint -DLINT $(INCLUDES) $(SRC)>fluff
Expand Down
81 changes: 42 additions & 39 deletions test/Makefile
Expand Up @@ -12,6 +12,7 @@ PERL= perl
# KRB5 stuff
KRB5_INCLUDES=
LIBKRB5=
TEST= igetest.c

PEX_LIBS=
EX_LIBS= #-lnsl -lsocket
Expand Down Expand Up @@ -141,90 +142,90 @@ alltests: \
test_ss test_ca test_engine test_evp test_ssl test_tsa test_ige \
test_jpake test_srp test_cms test_ocsp test_v3name

test_evp:
test_evp: $(EVPTEST) evptests.txt
../util/shlib_wrap.sh ./$(EVPTEST) evptests.txt

test_des:
test_des: $(DESTEST)
../util/shlib_wrap.sh ./$(DESTEST)

test_idea:
test_idea: $(IDEATEST)
../util/shlib_wrap.sh ./$(IDEATEST)

test_sha:
test_sha: $(SHATEST) $(SHA1TEST) $(SHA256TEST) $(SHA512TEST)
../util/shlib_wrap.sh ./$(SHATEST)
../util/shlib_wrap.sh ./$(SHA1TEST)
../util/shlib_wrap.sh ./$(SHA256TEST)
../util/shlib_wrap.sh ./$(SHA512TEST)

test_mdc2:
test_mdc2: $(MDC2TEST)
../util/shlib_wrap.sh ./$(MDC2TEST)

test_md5:
test_md5: $(MD5TEST)
../util/shlib_wrap.sh ./$(MD5TEST)

test_md4:
test_md4: $(MD4TEST)
../util/shlib_wrap.sh ./$(MD4TEST)

test_hmac:
test_hmac: $(HMACTEST)
../util/shlib_wrap.sh ./$(HMACTEST)

test_wp:
test_wp: $(WPTEST)
../util/shlib_wrap.sh ./$(WPTEST)

test_md2:
test_md2: $(MD2TEST)
../util/shlib_wrap.sh ./$(MD2TEST)

test_rmd:
test_rmd: $(RMDTEST)
../util/shlib_wrap.sh ./$(RMDTEST)

test_bf:
test_bf: $(BFTEST)
../util/shlib_wrap.sh ./$(BFTEST)

test_cast:
test_cast: $(CASTTEST)
../util/shlib_wrap.sh ./$(CASTTEST)

test_rc2:
test_rc2: $(RC2TEST)
../util/shlib_wrap.sh ./$(RC2TEST)

test_rc4:
test_rc4: $(RC4TEST)
../util/shlib_wrap.sh ./$(RC4TEST)

test_rc5:
test_rc5: $(RC5TEST)
../util/shlib_wrap.sh ./$(RC5TEST)

test_rand:
test_rand: $(RANDTEST)
../util/shlib_wrap.sh ./$(RANDTEST)

test_enc:
test_enc: ../apps/openssl testenc
@sh ./testenc

test_x509:
test_x509: ../apps/openssl tx509 testx509.pem v3-cert1.pem v3-cert2.pem
echo test normal x509v1 certificate
sh ./tx509 2>/dev/null
echo test first x509v3 certificate
sh ./tx509 v3-cert1.pem 2>/dev/null
echo test second x509v3 certificate
sh ./tx509 v3-cert2.pem 2>/dev/null

test_rsa: $(RSATEST)$(EXE_EXT)
test_rsa: $(RSATEST)$(EXE_EXT) ../apps/openssl trsa testrsa.pem
@sh ./trsa 2>/dev/null
../util/shlib_wrap.sh ./$(RSATEST)

test_crl:
test_crl: ../apps/openssl tcrl testcrl.pem
@sh ./tcrl 2>/dev/null

test_sid:
test_sid: ../apps/openssl tsid testsid.pem
@sh ./tsid 2>/dev/null

test_req:
test_req: ../apps/openssl treq testreq.pem testreq2.pem
@sh ./treq 2>/dev/null
@sh ./treq testreq2.pem 2>/dev/null

test_pkcs7:
test_pkcs7: ../apps/openssl tpkcs7 tpkcs7d testp7.pem pkcs7-1.pem
@sh ./tpkcs7 2>/dev/null
@sh ./tpkcs7d 2>/dev/null

test_bn:
test_bn: $(BNTEST) $(EXPTEST) bctest
@echo starting big number library test, could take a while...
@../util/shlib_wrap.sh ./$(BNTEST) >tmp.bntest
@echo quit >>tmp.bntest
Expand All @@ -233,49 +234,51 @@ test_bn:
@echo 'test a^b%c implementations'
../util/shlib_wrap.sh ./$(EXPTEST)

test_ec:
test_ec: $(ECTEST)
@echo 'test elliptic curves'
../util/shlib_wrap.sh ./$(ECTEST)

test_ecdsa:
test_ecdsa: $(ECDSATEST)
@echo 'test ecdsa'
../util/shlib_wrap.sh ./$(ECDSATEST)

test_ecdh:
test_ecdh: $(ECDHTEST)
@echo 'test ecdh'
../util/shlib_wrap.sh ./$(ECDHTEST)

test_verify:
test_verify: ../apps/openssl
@echo "The following command should have some OK's and some failures"
@echo "There are definitly a few expired certificates"
../util/shlib_wrap.sh ../apps/openssl verify -CApath ../certs/demo ../certs/demo/*.pem

test_dh:
test_dh: $(DHTEST)
@echo "Generate a set of DH parameters"
../util/shlib_wrap.sh ./$(DHTEST)

test_dsa:
test_dsa: $(DSATEST)
@echo "Generate a set of DSA parameters"
../util/shlib_wrap.sh ./$(DSATEST)
../util/shlib_wrap.sh ./$(DSATEST) -app2_1

test_gen:
test_gen testreq.pem: ../apps/openssl testgen test.cnf
@echo "Generate and verify a certificate request"
@sh ./testgen

test_ss keyU.ss certU.ss certCA.ss certP1.ss keyP1.ss certP2.ss keyP2.ss \
intP1.ss intP2.ss: testss
intP1.ss intP2.ss: testss CAss.cnf Uss.cnf P1ss.cnf P2ss.cnf \
../apps/openssl
@echo "Generate and certify a test certificate"
@sh ./testss
@cat certCA.ss certU.ss > intP1.ss
@cat certCA.ss certU.ss certP1.ss > intP2.ss

test_engine:
test_engine: $(ENGINETEST)
@echo "Manipulate the ENGINE structures"
../util/shlib_wrap.sh ./$(ENGINETEST)

test_ssl: keyU.ss certU.ss certCA.ss certP1.ss keyP1.ss certP2.ss keyP2.ss \
intP1.ss intP2.ss
intP1.ss intP2.ss $(SSLTEST) testssl testsslproxy \
../apps/server2.pem
@echo "test SSL protocol"
@if [ -n "$(FIPSCANLIB)" ]; then \
sh ./testfipsssl keyU.ss certU.ss certCA.ss; \
Expand All @@ -285,7 +288,7 @@ test_ssl: keyU.ss certU.ss certCA.ss certP1.ss keyP1.ss certP2.ss keyP2.ss \
@sh ./testsslproxy keyP1.ss certP1.ss intP1.ss
@sh ./testsslproxy keyP2.ss certP2.ss intP2.ss

test_ca:
test_ca: ../apps/openssl testca CAss.cnf Uss.cnf
@if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then \
echo "skipping CA.sh test -- requires RSA"; \
else \
Expand All @@ -297,7 +300,7 @@ test_aes: #$(AESTEST)
# @echo "test Rijndael"
# ../util/shlib_wrap.sh ./$(AESTEST)

test_tsa:
test_tsa: ../apps/openssl testtsa CAtsa.cnf ../util/shlib_wrap.sh
@if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then \
echo "skipping testtsa test -- requires RSA"; \
else \
Expand All @@ -312,15 +315,15 @@ test_jpake: $(JPAKETEST)$(EXE_EXT)
@echo "Test JPAKE"
../util/shlib_wrap.sh ./$(JPAKETEST)

test_cms:
test_cms: ../apps/openssl cms-test.pl smcont.txt
@echo "CMS consistency test"
$(PERL) cms-test.pl

test_srp: $(SRPTEST)$(EXE_EXT)
@echo "Test SRP"
../util/shlib_wrap.sh ./srptest

test_ocsp:
test_ocsp: ../apps/openssl tocsp
@echo "Test OCSP"
@sh ./tocsp

Expand Down
48 changes: 24 additions & 24 deletions test/tcrl
Expand Up @@ -9,70 +9,70 @@ else
fi

echo testing crl conversions
cp $t fff.p
cp $t crl-fff.p

echo "p -> d"
$cmd -in fff.p -inform p -outform d >f.d
$cmd -in crl-fff.p -inform p -outform d >crl-f.d
if [ $? != 0 ]; then exit 1; fi
#echo "p -> t"
#$cmd -in fff.p -inform p -outform t >f.t
#$cmd -in crl-fff.p -inform p -outform t >crl-f.t
#if [ $? != 0 ]; then exit 1; fi
echo "p -> p"
$cmd -in fff.p -inform p -outform p >f.p
$cmd -in crl-fff.p -inform p -outform p >crl-f.p
if [ $? != 0 ]; then exit 1; fi

echo "d -> d"
$cmd -in f.d -inform d -outform d >ff.d1
$cmd -in crl-f.d -inform d -outform d >crl-ff.d1
if [ $? != 0 ]; then exit 1; fi
#echo "t -> d"
#$cmd -in f.t -inform t -outform d >ff.d2
#$cmd -in crl-f.t -inform t -outform d >crl-ff.d2
#if [ $? != 0 ]; then exit 1; fi
echo "p -> d"
$cmd -in f.p -inform p -outform d >ff.d3
$cmd -in crl-f.p -inform p -outform d >crl-ff.d3
if [ $? != 0 ]; then exit 1; fi

#echo "d -> t"
#$cmd -in f.d -inform d -outform t >ff.t1
#$cmd -in crl-f.d -inform d -outform t >crl-ff.t1
#if [ $? != 0 ]; then exit 1; fi
#echo "t -> t"
#$cmd -in f.t -inform t -outform t >ff.t2
#$cmd -in crl-f.t -inform t -outform t >crl-ff.t2
#if [ $? != 0 ]; then exit 1; fi
#echo "p -> t"
#$cmd -in f.p -inform p -outform t >ff.t3
#$cmd -in crl-f.p -inform p -outform t >crl-ff.t3
#if [ $? != 0 ]; then exit 1; fi

echo "d -> p"
$cmd -in f.d -inform d -outform p >ff.p1
$cmd -in crl-f.d -inform d -outform p >crl-ff.p1
if [ $? != 0 ]; then exit 1; fi
#echo "t -> p"
#$cmd -in f.t -inform t -outform p >ff.p2
#$cmd -in crl-f.t -inform t -outform p >crl-ff.p2
#if [ $? != 0 ]; then exit 1; fi
echo "p -> p"
$cmd -in f.p -inform p -outform p >ff.p3
$cmd -in crl-f.p -inform p -outform p >crl-ff.p3
if [ $? != 0 ]; then exit 1; fi

cmp fff.p f.p
cmp crl-fff.p crl-f.p
if [ $? != 0 ]; then exit 1; fi
cmp fff.p ff.p1
cmp crl-fff.p crl-ff.p1
if [ $? != 0 ]; then exit 1; fi
#cmp fff.p ff.p2
#cmp crl-fff.p crl-ff.p2
#if [ $? != 0 ]; then exit 1; fi
cmp fff.p ff.p3
cmp crl-fff.p crl-ff.p3
if [ $? != 0 ]; then exit 1; fi

#cmp f.t ff.t1
#cmp crl-f.t crl-ff.t1
#if [ $? != 0 ]; then exit 1; fi
#cmp f.t ff.t2
#cmp crl-f.t crl-ff.t2
#if [ $? != 0 ]; then exit 1; fi
#cmp f.t ff.t3
#cmp crl-f.t crl-ff.t3
#if [ $? != 0 ]; then exit 1; fi

cmp f.p ff.p1
cmp crl-f.p crl-ff.p1
if [ $? != 0 ]; then exit 1; fi
#cmp f.p ff.p2
#cmp crl-f.p crl-ff.p2
#if [ $? != 0 ]; then exit 1; fi
cmp f.p ff.p3
cmp crl-f.p crl-ff.p3
if [ $? != 0 ]; then exit 1; fi

/bin/rm -f f.* ff.* fff.*
/bin/rm -f crl-f.* crl-ff.* crl-fff.*
exit 0

0 comments on commit e887c41

Please sign in to comment.