MAKEFILE= Makefile.ssl
MAKE= make -f $(MAKEFILE)
MAKEDEPEND= $(TOP)/util/domd $(TOP)
+PERL= perl
PEX_LIBS=
EX_LIBS= #-lnsl -lsocket
test_rmd test_rc2 test_rc4 test_rc5 test_bf test_cast \
test_rand test_bn test_enc test_x509 test_rsa test_crl test_sid \
test_gen test_req test_pkcs7 test_verify test_dh test_dsa \
- test_ss test_ssl test_ca
+ test_ss test_ca test_ssl
apps:
@(cd ../apps; $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' all)
test_bn:
@echo starting big number library test, could take a while...
-# This *should* work:
-# @(./$(BNTEST)|bc) | awk '{ \
-# Some broken bc's treat the pipe as a terminal :-(
-# By using a temporary file, errors detected by awk may be farther away from
-# the test that caused them; but even with the pipe there'd be some distance.
- @(./$(BNTEST) >tmp.bntest; echo quit >>tmp.bntest; bc tmp.bntest) | awk '{ \
-if ($$0 != "0") {print "error"; exit(1); } \
-if (((NR+1)%64) == 0) print NR+1," tests done"; }'
+ @./$(BNTEST) >tmp.bntest
+ @echo quit >>tmp.bntest
+ @echo "running bc"
+ @bc tmp.bntest 2>&1 | $(PERL) -e 'while (<STDIN>) {if (/^test (.*)/) {print STDERR "\nverify $$1";} elsif (!/^0$$/) {die "\nFailed! bc: $$_";} print STDERR "."; $$i++;} print STDERR "\n$$i tests passed\n"'
@echo 'test a^b%c implementations'
./$(EXPTEST)
../apps/openssl verify -CApath ../certs ../certs/*.pem
test_dh:
- @echo "Generate as set of DH parameters"
+ @echo "Generate a set of DH parameters"
./$(DHTEST)
test_dsa:
- @echo "Generate as set of DSA parameters"
+ @echo "Generate a set of DSA parameters"
./$(DSATEST)
+ ./$(DSATEST) -app2_1
test_gen:
@echo "Generate and verify a certificate request"
@sh ./testgen
-test_ss:
+test_ss keyU.ss certU.ss certCA.ss: testss
@echo "Generate and certify a test certificate"
@sh ./testss
-test_ssl:
+test_ssl: keyU.ss certU.ss certCA.ss
@echo "test SSL protocol"
- @sh ./testssl
+ @sh ./testssl keyU.ss certU.ss certCA.ss
test_ca:
- @echo "Generate and certify a test certificate via the 'ca' program"
- @sh ./testca
+ @if ../apps/openssl no-rsa; then \
+ echo "skipping CA.sh test -- requires RSA"; \
+ else \
+ echo "Generate and certify a test certificate via the 'ca' program"; \
+ sh ./testca; \
+ fi
lint:
lint -DLINT $(INCLUDES) $(SRC)>fluff