testgen 859 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/sh
  2. T=testcert
  3. KEY=512
  4. CA=../certs/testca.pem
  5. /bin/rm -f $T.1 $T.2 $T.key
  6. if test "$OSTYPE" = msdosdjgpp; then
  7. PATH=../apps\;$PATH;
  8. else
  9. PATH=../apps:$PATH;
  10. fi
  11. export PATH
  12. echo "generating certificate request"
  13. echo "string to make the random number generator think it has entropy" >> ./.rnd
  14. if ../util/shlib_wrap.sh ../apps/openssl no-rsa >/dev/null; then
  15. req_new='-newkey dsa:../apps/dsa512.pem'
  16. else
  17. req_new='-new'
  18. echo "There should be a 2 sequences of .'s and some +'s."
  19. echo "There should not be more that at most 80 per line"
  20. fi
  21. rm -f testkey.pem testreq.pem
  22. echo Generating request
  23. ../util/shlib_wrap.sh ../apps/openssl req -config test.cnf $req_new -out testreq.pem || exit 1
  24. echo Verifying signature on request
  25. ../util/shlib_wrap.sh ../apps/openssl req -config test.cnf -verify -in testreq.pem -noout || exit 1
  26. exit 0