gencrls.sh 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/bin/bash
  2. # gencrls, crl config already done, see taoCerts.txt for setup
  3. # caCrl
  4. openssl ca -config ../renewcerts/wolfssl.cnf -gencrl -crldays 1000 -out crl.pem -keyfile ../ca-key.pem -cert ../ca-cert.pem
  5. # metadata
  6. openssl crl -in crl.pem -text > tmp
  7. mv tmp crl.pem
  8. # install (only needed if working outside wolfssl)
  9. #cp crl.pem ~/wolfssl/certs/crl/crl.pem
  10. # caCrl server revoked
  11. openssl ca -config ../renewcerts/wolfssl.cnf -revoke ../server-cert.pem -keyfile ../ca-key.pem -cert ../ca-cert.pem
  12. # caCrl server revoked generation
  13. openssl ca -config ../renewcerts/wolfssl.cnf -gencrl -crldays 1000 -out crl.revoked -keyfile ../ca-key.pem -cert ../ca-cert.pem
  14. # metadata
  15. openssl crl -in crl.revoked -text > tmp
  16. mv tmp crl.revoked
  17. # install (only needed if working outside wolfssl)
  18. #cp crl.revoked ~/wolfssl/certs/crl/crl.revoked
  19. # remove revoked so next time through the normal CA won't have server revoked
  20. cp blank.index.txt demoCA/index.txt
  21. # cliCrl
  22. openssl ca -config ../renewcerts/wolfssl.cnf -gencrl -crldays 1000 -out cliCrl.pem -keyfile ../client-key.pem -cert ../client-cert.pem
  23. # metadata
  24. openssl crl -in cliCrl.pem -text > tmp
  25. mv tmp cliCrl.pem
  26. # install (only needed if working outside wolfssl)
  27. #cp cliCrl.pem ~/wolfssl/certs/crl/cliCrl.pem
  28. # eccCliCRL
  29. openssl ca -config ../renewcerts/wolfssl.cnf -gencrl -crldays 1000 -out eccCliCRL.pem -keyfile ../ecc-client-key.pem -cert ../client-ecc-cert.pem
  30. # metadata
  31. openssl crl -in eccCliCRL.pem -text > tmp
  32. mv tmp eccCliCRL.pem
  33. # install (only needed if working outside wolfssl)
  34. #cp eccCliCRL.pem ~/wolfssl/certs/crl/eccCliCRL.pem
  35. # eccSrvCRL
  36. openssl ca -config ../renewcerts/wolfssl.cnf -gencrl -crldays 1000 -out eccSrvCRL.pem -keyfile ../ecc-key.pem -cert ../server-ecc.pem
  37. # metadata
  38. openssl crl -in eccSrvCRL.pem -text > tmp
  39. mv tmp eccSrvCRL.pem
  40. # install (only needed if working outside wolfssl)
  41. #cp eccSrvCRL.pem ~/wolfssl/certs/crl/eccSrvCRL.pem