Don't try to test the RSA command if it is not available.
[openssl.git] / test / Makefile.ssl
index 15323bd..a3386d9 100644 (file)
@@ -13,6 +13,7 @@ INSTALLTOP=   /usr/local/ssl
 MAKEFILE=      Makefile.ssl
 MAKE=          make -f $(MAKEFILE)
 MAKEDEPEND=    $(TOP)/util/domd $(TOP)
+PERL=          perl
 
 PEX_LIBS=
 EX_LIBS= #-lnsl -lsocket
@@ -50,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) \
@@ -98,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:
@@ -180,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)
 
@@ -192,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
 
@@ -219,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))
@@ -325,16 +328,19 @@ 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/dsa.h
-dsatest.o: ../include/openssl/err.h ../include/openssl/opensslconf.h
-dsatest.o: ../include/openssl/opensslv.h ../include/openssl/rand.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/stack.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
@@ -359,11 +365,12 @@ 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_oaep_test.o: ../include/openssl/bn.h ../include/openssl/crypto.h
-rsa_oaep_test.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
-rsa_oaep_test.o: ../include/openssl/err.h ../include/openssl/opensslconf.h
-rsa_oaep_test.o: ../include/openssl/opensslv.h ../include/openssl/rsa.h
-rsa_oaep_test.o: ../include/openssl/stack.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
@@ -378,11 +385,12 @@ 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/rc2.h
-ssltest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
-ssltest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
-ssltest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
-ssltest.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
-ssltest.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
-ssltest.o: ../include/openssl/stack.h ../include/openssl/tls1.h
-ssltest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.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