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:2048
option specifies that the key should be 2048-bit, generated using the RSA algorithm.The
-nodes
option specifies that the private key should not be encrypted with a pass phrase.The
-new
option, 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
-key
option specifies an existing private key (domain.key
) that will be used to generate a new CSR. - The
-new
option 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
-x509toreq
option specifies that you are using an X509 certificate to make a CSR.