Don't try to test the RSA command if it is not available.
[openssl.git] / test / Makefile.ssl
index d359264..a3386d9 100644 (file)
@@ -7,17 +7,23 @@ TOP=          ..
 CC=            cc
 INCLUDES=      -I../include
 CFLAG=         -g
+INSTALL_PREFIX=
+OPENSSLDIR=     /usr/local/ssl
 INSTALLTOP=    /usr/local/ssl
 MAKEFILE=      Makefile.ssl
 MAKE=          make -f $(MAKEFILE)
 MAKEDEPEND=    $(TOP)/util/domd $(TOP)
+PERL=          perl
 
 PEX_LIBS=
 EX_LIBS= #-lnsl -lsocket
 
 CFLAGS= $(INCLUDES) $(CFLAG)
 
-GENERAL=Makefile.ssl
+GENERAL=Makefile.ssl maketests.com \
+       tests.com testenc.com tx509.com trsa.com tcrl.com tsid.com treq.com \
+       tpkcs7.com tpkcs7d.com tverify.com testgen.com testss.com testssl.com \
+       testca.com VMSca-response.1 VMSca-response.2
 
 DLIBCRYPTO= ../libcrypto.a
 DLIBSSL= ../libssl.a
@@ -45,7 +51,7 @@ DHTEST=               dhtest
 DSATEST=       dsatest
 METHTEST=      methtest
 SSLTEST=       ssltest
-RSATEST=       rsa_oaep_test
+RSATEST=       rsa_test
 
 EXE=   $(BNTEST) $(IDEATEST) $(MD2TEST)  $(MD5TEST) $(HMACTEST) \
        $(RC2TEST) $(RC4TEST) $(RC5TEST) \
@@ -93,9 +99,9 @@ tags:
 
 tests: exe apps \
        test_des test_idea test_sha test_md5 test_hmac test_md2 test_mdc2 \
-       test_rc2 test_rc4 test_rc5 test_bf test_cast \
+       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_reqgen test_req test_pkcs7 test_verify test_dh test_dsa \
+       test_gen test_req test_pkcs7 test_verify test_dh test_dsa \
        test_ss test_ssl test_ca
 
 apps:
@@ -175,9 +181,10 @@ test_pkcs7:
 
 test_bn:
        @echo starting big number library test, could take a while...
-       @(./$(BNTEST)|bc) | 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)
 
@@ -187,14 +194,15 @@ test_verify:
        ../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_reqgen:
+test_gen:
        @echo "Generate and verify a certificate request"
        @sh ./testgen
 
@@ -214,14 +222,14 @@ lint:
        lint -DLINT $(INCLUDES) $(SRC)>fluff
 
 depend:
-       $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(SRC)
+       $(MAKEDEPEND) $(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 $(EXE) *.ss log
+       rm -f .rnd tmp.bntest *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) *.ss log
 
 $(DLIBSSL):
        (cd ../ssl; $(MAKE))
@@ -297,55 +305,92 @@ $(SSLTEST): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO)
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.
 
-bftest.o: ../include/blowfish.h
-bntest.o: ../include/asn1.h ../include/bio.h ../include/blowfish.h
-bntest.o: ../include/bn.h ../include/cast.h ../include/crypto.h
-bntest.o: ../include/des.h ../include/dh.h ../include/dsa.h ../include/e_os.h
-bntest.o: ../include/err.h ../include/evp.h ../include/idea.h ../include/md2.h
-bntest.o: ../include/md5.h ../include/mdc2.h ../include/objects.h
-bntest.o: ../include/opensslv.h ../include/pkcs7.h ../include/rand.h
-bntest.o: ../include/rc2.h ../include/rc4.h ../include/rc5.h
-bntest.o: ../include/ripemd.h ../include/rsa.h ../include/sha.h
-bntest.o: ../include/stack.h ../include/x509.h ../include/x509_vfy.h
-casttest.o: ../include/cast.h
-destest.o: ../include/des.h
-dhtest.o: ../include/bio.h ../include/bn.h ../include/crypto.h ../include/dh.h
-dhtest.o: ../include/opensslv.h ../include/stack.h
-dsatest.o: ../include/bio.h ../include/bn.h ../include/crypto.h
-dsatest.o: ../include/dsa.h ../include/err.h ../include/opensslv.h
-dsatest.o: ../include/rand.h ../include/stack.h
-exptest.o: ../include/bio.h ../include/bn.h ../include/crypto.h
-exptest.o: ../include/err.h ../include/opensslv.h ../include/rand.h
-exptest.o: ../include/stack.h
-hmactest.o: ../include/asn1.h ../include/bio.h ../include/blowfish.h
-hmactest.o: ../include/bn.h ../include/cast.h ../include/crypto.h
-hmactest.o: ../include/des.h ../include/dh.h ../include/dsa.h ../include/evp.h
-hmactest.o: ../include/hmac.h ../include/idea.h ../include/md2.h
-hmactest.o: ../include/md5.h ../include/mdc2.h ../include/objects.h
-hmactest.o: ../include/opensslv.h ../include/rc2.h ../include/rc4.h
-hmactest.o: ../include/rc5.h ../include/ripemd.h ../include/rsa.h
-hmactest.o: ../include/sha.h ../include/stack.h
-ideatest.o: ../include/idea.h
-md2test.o: ../include/md2.h
-md5test.o: ../include/md5.h
-mdc2test.o: ../include/des.h ../include/mdc2.h
-randtest.o: ../include/rand.h
-rc2test.o: ../include/rc2.h
-rc4test.o: ../include/rc4.h
-rc5test.o: ../include/rc5.h
-rmdtest.o: ../include/ripemd.h
-rsa_oaep_test.o: ../include/bn.h ../include/crypto.h ../include/e_os.h
-rsa_oaep_test.o: ../include/opensslv.h ../include/rsa.h ../include/stack.h
-sha1test.o: ../include/sha.h
-shatest.o: ../include/sha.h
-ssltest.o: ../include/asn1.h ../include/bio.h ../include/blowfish.h
-ssltest.o: ../include/bn.h ../include/buffer.h ../include/cast.h
-ssltest.o: ../include/crypto.h ../include/des.h ../include/dh.h
-ssltest.o: ../include/dsa.h ../include/e_os.h ../include/err.h ../include/evp.h
-ssltest.o: ../include/idea.h ../include/lhash.h ../include/md2.h
-ssltest.o: ../include/md5.h ../include/mdc2.h ../include/objects.h
-ssltest.o: ../include/opensslv.h ../include/pkcs7.h ../include/rc2.h
-ssltest.o: ../include/rc4.h ../include/rc5.h ../include/ripemd.h
-ssltest.o: ../include/rsa.h ../include/sha.h ../include/ssl.h ../include/ssl2.h
-ssltest.o: ../include/ssl23.h ../include/ssl3.h ../include/stack.h
-ssltest.o: ../include/tls1.h ../include/x509.h ../include/x509_vfy.h
+bftest.o: ../include/openssl/blowfish.h
+bntest.o: ../include/openssl/asn1.h ../include/openssl/bio.h
+bntest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
+bntest.o: ../include/openssl/cast.h ../include/openssl/crypto.h
+bntest.o: ../include/openssl/des.h ../include/openssl/dh.h
+bntest.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
+bntest.o: ../include/openssl/e_os2.h ../include/openssl/err.h
+bntest.o: ../include/openssl/evp.h ../include/openssl/idea.h
+bntest.o: ../include/openssl/md2.h ../include/openssl/md5.h
+bntest.o: ../include/openssl/mdc2.h ../include/openssl/objects.h
+bntest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+bntest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+bntest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
+bntest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
+bntest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
+bntest.o: ../include/openssl/sha.h ../include/openssl/stack.h
+bntest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
+casttest.o: ../include/openssl/cast.h
+destest.o: ../include/openssl/des.h ../include/openssl/e_os2.h
+destest.o: ../include/openssl/opensslconf.h
+dhtest.o: ../include/openssl/bio.h ../include/openssl/bn.h
+dhtest.o: ../include/openssl/crypto.h ../include/openssl/dh.h
+dhtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+dhtest.o: ../include/openssl/rand.h ../include/openssl/safestack.h
+dhtest.o: ../include/openssl/stack.h
+dsatest.o: ../include/openssl/bio.h ../include/openssl/bn.h
+dsatest.o: ../include/openssl/crypto.h ../include/openssl/dh.h
+dsatest.o: ../include/openssl/dsa.h ../include/openssl/err.h
+dsatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+dsatest.o: ../include/openssl/rand.h ../include/openssl/safestack.h
+dsatest.o: ../include/openssl/stack.h
+exptest.o: ../include/openssl/bio.h ../include/openssl/bn.h
+exptest.o: ../include/openssl/crypto.h ../include/openssl/err.h
+exptest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+exptest.o: ../include/openssl/rand.h ../include/openssl/safestack.h
+exptest.o: ../include/openssl/stack.h
+hmactest.o: ../include/openssl/asn1.h ../include/openssl/bio.h
+hmactest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
+hmactest.o: ../include/openssl/cast.h ../include/openssl/crypto.h
+hmactest.o: ../include/openssl/des.h ../include/openssl/dh.h
+hmactest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
+hmactest.o: ../include/openssl/evp.h ../include/openssl/hmac.h
+hmactest.o: ../include/openssl/idea.h ../include/openssl/md2.h
+hmactest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+hmactest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+hmactest.o: ../include/openssl/opensslv.h ../include/openssl/rc2.h
+hmactest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
+hmactest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
+hmactest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
+hmactest.o: ../include/openssl/stack.h
+ideatest.o: ../include/openssl/idea.h ../include/openssl/opensslconf.h
+md2test.o: ../include/openssl/md2.h ../include/openssl/opensslconf.h
+md5test.o: ../include/openssl/md5.h
+mdc2test.o: ../include/openssl/des.h ../include/openssl/e_os2.h
+mdc2test.o: ../include/openssl/mdc2.h ../include/openssl/opensslconf.h
+randtest.o: ../include/openssl/rand.h
+rc2test.o: ../include/openssl/opensslconf.h ../include/openssl/rc2.h
+rc4test.o: ../include/openssl/opensslconf.h ../include/openssl/rc4.h
+rc5test.o: ../include/openssl/rc5.h
+rmdtest.o: ../include/openssl/ripemd.h
+rsa_test.o: ../include/openssl/bn.h ../include/openssl/crypto.h
+rsa_test.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
+rsa_test.o: ../include/openssl/err.h ../include/openssl/opensslconf.h
+rsa_test.o: ../include/openssl/opensslv.h ../include/openssl/rand.h
+rsa_test.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
+rsa_test.o: ../include/openssl/stack.h
+sha1test.o: ../include/openssl/sha.h
+shatest.o: ../include/openssl/sha.h
+ssltest.o: ../include/openssl/asn1.h ../include/openssl/bio.h
+ssltest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
+ssltest.o: ../include/openssl/buffer.h ../include/openssl/cast.h
+ssltest.o: ../include/openssl/crypto.h ../include/openssl/des.h
+ssltest.o: ../include/openssl/dh.h ../include/openssl/dsa.h
+ssltest.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
+ssltest.o: ../include/openssl/err.h ../include/openssl/evp.h
+ssltest.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+ssltest.o: ../include/openssl/md2.h ../include/openssl/md5.h
+ssltest.o: ../include/openssl/mdc2.h ../include/openssl/objects.h
+ssltest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+ssltest.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+ssltest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+ssltest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
+ssltest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
+ssltest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
+ssltest.o: ../include/openssl/sha.h ../include/openssl/ssl.h
+ssltest.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
+ssltest.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
+ssltest.o: ../include/openssl/tls1.h ../include/openssl/x509.h
+ssltest.o: ../include/openssl/x509_vfy.h