2
0

gen_revoked.sh 961 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. ###########################################################
  3. ########## update and sign server-revoked-key.pem ################
  4. ###########################################################
  5. echo "Updating server-revoked-cert.pem"
  6. echo ""
  7. #pipe the following arguments to openssl req...
  8. echo -e "US\nMontana\nBozeman\nwolfSSL_revoked\nSupport_revoked\nwww.wolfssl.com\ninfo@wolfssl.com\n.\n.\n" | openssl req -new -key server-revoked-key.pem -nodes > server-revoked-req.pem
  9. openssl x509 -req -in server-revoked-req.pem -extfile renewcerts/wolfssl.cnf -extensions wolfssl_opts -days 1000 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 02 > server-revoked-cert.pem
  10. rm server-revoked-req.pem
  11. openssl x509 -in ca-cert.pem -text > ca_tmp.pem
  12. openssl x509 -in server-revoked-cert.pem -text > srv_tmp.pem
  13. mv srv_tmp.pem server-revoked-cert.pem
  14. cat ca_tmp.pem >> server-revoked-cert.pem
  15. rm ca_tmp.pem