OpenSSL: Add section for key and cert generation in one go

This commit is contained in:
2022-09-01 07:40:35 +02:00
parent aea38e450e
commit 34d6af9826

View File

@@ -18,7 +18,13 @@ The `-pkeyopt rsa_keygen_bits:2048` determines the key length. The default value
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -outform PEM -out private_key.key
```
### Generate a new private key and Certificate Signing Request
### Generate a new private key and certificate
```
openssl req -x509 -newkey rsa:4096 -keyout private_key.key -out certificate.crt -sha256 -days 365
```
### Generate a new private key and certificate signing request (CSR)
```
openssl req -out signing_request.csr -new -newkey rsa:2048 -nodes -keyout private_key.key