Skip to content

Instantly share code, notes, and snippets.

@deepforu47
Forked from superseb/openssl-generate-rsa-pss.sh
Last active October 31, 2023 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deepforu47/02d0603d29947d66e34ffc980ea8f9d0 to your computer and use it in GitHub Desktop.
Save deepforu47/02d0603d29947d66e34ffc980ea8f9d0 to your computer and use it in GitHub Desktop.
Generate openssl pss certificate
# Generate RSASSA-PSS private key for CA
# The key size is 2048; the exponent is 65537
openssl genpkey -algorithm rsa-pss -pkeyopt rsa_keygen_bits:2048 -out CA.priKey
# Generate self-signed RSASSA-PSS CA
openssl req -x509 -new -key CA.priKey -subj "/CN=CA" -sha256 -out CA.cer
# Generate RSASSA-PSS private key for EE
openssl genpkey -algorithm rsa-pss -pkeyopt rsa_keygen_bits:2048 -out EE.priKey
# Generate certificate signing request for RSASSA-PSS EE
openssl req -new -key EE.priKey -subj "/CN=my.org" -sha256 -out EE.csr
# Generate RSASSA-PSS EE based on the above CSR, and sign it with the above RSASSA-PSS CA
openssl x509 -req -CAcreateserial -in EE.csr -sha256 -CA CA.cer -CAkey CA.priKey -out EE.cer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment