gen_revoked.sh 948 B

123456789101112131415161718
  1. ###########################################################
  2. ########## update and sign server-revoked-key.pem ################
  3. ###########################################################
  4. echo "Updating server-revoked-cert.pem"
  5. echo ""
  6. #pipe the following arguments to openssl req...
  7. 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
  8. 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
  9. rm server-revoked-req.pem
  10. openssl x509 -in ca-cert.pem -text > ca_tmp.pem
  11. openssl x509 -in server-revoked-cert.pem -text > srv_tmp.pem
  12. mv srv_tmp.pem server-revoked-cert.pem
  13. cat ca_tmp.pem >> server-revoked-cert.pem
  14. rm ca_tmp.pem