From 35ee5b72dfb6433b014c1b2c361217328b596f2c Mon Sep 17 00:00:00 2001 From: Klagarge Date: Fri, 5 Apr 2024 13:26:58 +0200 Subject: [PATCH 1/2] add ssl-lab --- infotro/SDi/labs/SSL/README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 infotro/SDi/labs/SSL/README.md diff --git a/infotro/SDi/labs/SSL/README.md b/infotro/SDi/labs/SSL/README.md new file mode 100644 index 0000000..4c1d2ac --- /dev/null +++ b/infotro/SDi/labs/SSL/README.md @@ -0,0 +1,25 @@ +

+Lab OpenSSL & Certificates +

+ +---------- + +# Create an RSA key +```bash +openssl genrsa -out .key 2048 +``` + +# Self-sign root certificate +```bash +openssl req -new -x509 -days 365 -key ca.key -config ca.cnf -out ca.crt +``` + +# Create a request +```bash +openssl req -new -sha256 -key .key -config .cnf -out .csr +``` + +# Sign a request with root certificate +```bash +openssl ca -config ca_ssl.cnf -in .csr -out .crt +``` \ No newline at end of file From 0149f59c8283b2ef93dd31ded039cb0414662342 Mon Sep 17 00:00:00 2001 From: Klagarge Date: Fri, 5 Apr 2024 14:14:23 +0200 Subject: [PATCH 2/2] add description to a certificate --- infotro/SDi/labs/SSL/README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/infotro/SDi/labs/SSL/README.md b/infotro/SDi/labs/SSL/README.md index 4c1d2ac..0b6868b 100644 --- a/infotro/SDi/labs/SSL/README.md +++ b/infotro/SDi/labs/SSL/README.md @@ -4,22 +4,26 @@ Lab OpenSSL & Certificates ---------- -# Create an RSA key +A certificate is a digital document that certifies the ownership of a public key by the named subject of the certificate. +The certificate is signed by a certificate authority (CA) that is trusted by the parties who trust the certificate. +The certificate authority is responsible for verifying the identity of the certificate holder and signing the certificate. + +## Create an RSA key ```bash openssl genrsa -out .key 2048 ``` -# Self-sign root certificate +## Self-sign root certificate ```bash openssl req -new -x509 -days 365 -key ca.key -config ca.cnf -out ca.crt ``` -# Create a request +## Create a request ```bash openssl req -new -sha256 -key .key -config .cnf -out .csr ``` -# Sign a request with root certificate +## Sign a request with root certificate ```bash openssl ca -config ca_ssl.cnf -in .csr -out .crt ``` \ No newline at end of file