mkxcerts.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/sh
  2. # Create certificates using various algorithms to test multi-certificate
  3. # functionality.
  4. opensslcmd() {
  5. LD_LIBRARY_PATH=../../.. ../../../apps/openssl $@
  6. }
  7. opensslcmd version
  8. CN="OpenSSL Test RSA SHA-1 cert" opensslcmd req \
  9. -config apps.cnf -extensions usr_cert -x509 -nodes \
  10. -keyout tsha1.pem -out tsha1.pem -new -days 3650 -sha1
  11. CN="OpenSSL Test RSA SHA-256 cert" opensslcmd req \
  12. -config apps.cnf -extensions usr_cert -x509 -nodes \
  13. -keyout tsha256.pem -out tsha256.pem -new -days 3650 -sha256
  14. CN="OpenSSL Test RSA SHA-512 cert" opensslcmd req \
  15. -config apps.cnf -extensions usr_cert -x509 -nodes \
  16. -keyout tsha512.pem -out tsha512.pem -new -days 3650 -sha512
  17. # Create EC parameters
  18. opensslcmd ecparam -name P-256 -out ecp256.pem
  19. opensslcmd ecparam -name P-384 -out ecp384.pem
  20. CN="OpenSSL Test P-256 SHA-256 cert" opensslcmd req \
  21. -config apps.cnf -extensions ec_cert -x509 -nodes \
  22. -nodes -keyout tecp256.pem -out tecp256.pem -newkey ec:ecp256.pem \
  23. -days 3650 -sha256
  24. CN="OpenSSL Test P-384 SHA-384 cert" opensslcmd req \
  25. -config apps.cnf -extensions ec_cert -x509 -nodes \
  26. -nodes -keyout tecp384.pem -out tecp384.pem -newkey ec:ecp384.pem \
  27. -days 3650 -sha384