Generate a private key and a CSR
This command creates a 2048-bit private key (domain.key) and a CSR (domain.csr) from scratch:
| |
The
-newkey rsa:2048option specifies that the key should be 2048-bit, generated using the RSA algorithm.The
-nodesoption specifies that the private key should not be encrypted with a pass phrase.The
-newoption, which is not included here but implied, indicates that a CSR is being generated.
Generate a CSR from a existing private key
This command creates a new CSR (domain.csr) based on an existing private key (domain.key):
| |
- The
-keyoption specifies an existing private key (domain.key) that will be used to generate a new CSR. - The
-newoption indicates that a CSR is being generated.
Generate a CSR from an existing certificate and private key
This command creates a new CSR (domain.csr) based on an existing certificate (domain.crt) and private key (domain.key):
| |
- The
-x509toreqoption specifies that you are using an X509 certificate to make a CSR.