Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Generates a 2048-bit RSA private key and saves it to private_key.pem. When prompted, input the Secret Passphrase.


Code Block
languageshell
openssl genrsa -out private_key.pem 2048

Extract the public key

This step extracts the public key from the private key and saves it to public.pem


Code Block
languageshell
openssl rsa -in private_key.pem -pubout -out public.pem


Generate a self-signed certificate with 10yr validity

Creates a self-signed X.509 certificate using the private key (private_key.pem) and saves it to certificate.pem



Code Block
languageshell
openssl req -new -x509 -key private_key.pem -out certificate.pem -days 3650 -subj "/C=US/ST=Pennsylvania/L=Philadelphia/O=RDKM/OU=RDKE MW/CN=RDKM"
Create a PKCS#12 File

This P12 file (signing.p12) contains the private key and the certificate. Used for securely storing and transporting private keys and certificates. When prompted, input the same Secret Passphrase.


Code Block
languageshell
openssl pkcs12 -export -out signing.p12 -inkey private_key.pem -in certificate.pem

Check the private key

This verifies the integrity of the private key (private_key.pem)


Code Block
languageshell
openssl rsa -in private_key.pem -check

Inspect the Certificate

Displays the details of the certificate (certificate.pem) in a human-readable format without outputting the raw certificate.

...