2
0

gen-rsapss-keys.sh 944 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. for key in root ca server client
  3. do
  4. openssl genpkey -algorithm RSA-PSS -pkeyopt rsa_keygen_bits:2048 -pkeyopt rsa_pss_keygen_md:sha256 -pkeyopt rsa_pss_keygen_mgf1_md:sha256 -pkeyopt rsa_pss_keygen_saltlen:32 > ${key}-rsapss-priv.pem
  5. openssl pkey -in ${key}-rsapss-priv.pem -outform DER -out ${key}-rsapss-priv.der
  6. openssl pkey -in ${key}-rsapss-priv.pem -outform PEM -pubout -out ${key}-rsapss-key.pem
  7. openssl pkey -in ${key}-rsapss-priv.pem -outform DER -pubout -out ${key}-rsapss-key.der
  8. done
  9. for key in root-3072 ca-3072 server-3072 client-3072
  10. do
  11. openssl genpkey -algorithm RSA-PSS -pkeyopt rsa_keygen_bits:3072 > ${key}-rsapss-priv.pem
  12. openssl pkey -in ${key}-rsapss-priv.pem -outform DER -out ${key}-rsapss-priv.der
  13. openssl pkey -in ${key}-rsapss-priv.pem -outform PEM -pubout -out ${key}-rsapss-key.pem
  14. openssl pkey -in ${key}-rsapss-priv.pem -outform DER -pubout -out ${key}-rsapss-key.der
  15. done