Let "make test" survive without DEVRANDOM

(and rename a target in test/Makefile.ssl to make it
easier to guess the name of the file executed by it)
This commit is contained in:
Bodo Möller 2000-01-14 18:43:22 +00:00
parent 7f5b6f0f19
commit 105c0be00f
3 changed files with 11 additions and 4 deletions

View File

@ -7,6 +7,7 @@
#include <openssl/crypto.h> #include <openssl/crypto.h>
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/rand.h>
#ifdef NO_RSA #ifdef NO_RSA
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
@ -203,6 +204,8 @@ static int pad_unknown(void)
return(0); return(0);
} }
static const char rnd_seed[] = "string to make the random number generator think it has entropy";
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
int err=0; int err=0;
@ -216,6 +219,8 @@ int main(int argc, char *argv[])
int clen = 0; int clen = 0;
int num; int num;
RAND_seed(rnd_seed, sizeof rnd_seed); /* or OAEP may fail */
CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
plen = sizeof(ptext_ex) - 1; plen = sizeof(ptext_ex) - 1;

View File

@ -100,7 +100,7 @@ tests: exe apps \
test_des test_idea test_sha test_md5 test_hmac test_md2 test_mdc2 \ test_des test_idea test_sha test_md5 test_hmac test_md2 test_mdc2 \
test_rmd 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_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 test_ss test_ssl test_ca
apps: apps:
@ -204,7 +204,7 @@ test_dsa:
@echo "Generate as set of DSA parameters" @echo "Generate as set of DSA parameters"
./$(DSATEST) ./$(DSATEST)
test_reqgen: test_gen:
@echo "Generate and verify a certificate request" @echo "Generate and verify a certificate request"
@sh ./testgen @sh ./testgen
@ -367,8 +367,8 @@ rmdtest.o: ../include/openssl/ripemd.h
rsa_oaep_test.o: ../include/openssl/bn.h ../include/openssl/crypto.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/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/err.h ../include/openssl/opensslconf.h
rsa_oaep_test.o: ../include/openssl/opensslv.h ../include/openssl/rsa.h rsa_oaep_test.o: ../include/openssl/opensslv.h ../include/openssl/rand.h
rsa_oaep_test.o: ../include/openssl/stack.h rsa_oaep_test.o: ../include/openssl/rsa.h ../include/openssl/stack.h
sha1test.o: ../include/openssl/sha.h sha1test.o: ../include/openssl/sha.h
shatest.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/asn1.h ../include/openssl/bio.h

View File

@ -15,6 +15,8 @@ echo "There should be a 2 sequences of .'s and some +'s."
echo "There should not be more that at most 80 per line" echo "There should not be more that at most 80 per line"
echo "This could take some time." echo "This could take some time."
echo "string to make the random number generator think it has entropy" >> ./.rnd
../apps/openssl req -config test.cnf -new -out testreq.pem ../apps/openssl req -config test.cnf -new -out testreq.pem
if [ $? != 0 ]; then if [ $? != 0 ]; then
echo problems creating request echo problems creating request