From 34d6af9826b96518c9a576aee1b0970ecf673486 Mon Sep 17 00:00:00 2001 From: Michael Schlapa Date: Thu, 1 Sep 2022 07:40:35 +0200 Subject: [PATCH] OpenSSL: Add section for key and cert generation in one go --- OpenSSL.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/OpenSSL.md b/OpenSSL.md index e04ef34..cf2c66a 100644 --- a/OpenSSL.md +++ b/OpenSSL.md @@ -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