chore(ansible): save outcomes of working with certificates, improve readability

This commit is contained in:
Michele Cereda
2024-09-21 14:59:47 +02:00
parent 513f869b1b
commit 79ddaed45a
5 changed files with 269 additions and 73 deletions

68
knowledge base/https.md Normal file
View File

@@ -0,0 +1,68 @@
# HTTPS
TODO
Intro
<!-- Remove this line to uncomment if used
## Table of contents <!-- omit in toc -->
1. [TL;DR](#tldr)
1. [Further readings](#further-readings)
1. [Sources](#sources)
## TL;DR
<!-- Uncomment if used
<details>
<summary>Setup</summary>
```sh
```
</details>
-->
<!-- Uncomment if used
<details>
<summary>Usage</summary>
```sh
```
</details>
-->
<!-- Uncomment if used
<details>
<summary>Real world use cases</summary>
```sh
```
</details>
-->
## Further readings
- [Website]
- [Main repository]
### Sources
- [How Does HTTPS Work? RSA Encryption Explained]
<!--
Reference
═╬═Time══
-->
<!-- In-article sections -->
<!-- Knowledge base -->
<!-- Files -->
<!-- Upstream -->
[main repository]: https://github.com/project/
[website]: https://website/
<!-- Others -->
[how does https work? rsa encryption explained]: https://tiptopsecurity.com/how-does-https-work-rsa-encryption-explained/

View File

@@ -1,7 +1,5 @@
# OpenSSL
## Table of contents <!-- omit in toc -->
1. [TL;DR](#tldr)
1. [Create a self signed certificate](#create-a-self-signed-certificate)
1. [Display the contents of a SSL certificate](#display-the-contents-of-a-ssl-certificate)
@@ -47,6 +45,7 @@ openssl req -text -noout -verify -in 'request.csr'
# Check existing keys and verify their consistency.
openssl rsa -check -in 'file.key'
openssl rsa -check -in 'file.key' -noout
# Check certificates or keys and return information about them.
openssl x509 -text -noout -in 'certificate.crt'
@@ -123,7 +122,8 @@ To avoid answering the questions (for automation), add
```sh
$ openssl req -x509 -out 'cert.pem' \
-newkey 'rsa:4096' -keyout 'key.pem' -days '365' -nodes -subj "/C=NL/ST=Nederlands/L=Amsterdam/O=Mek Net/OU=Org/CN=mek.info"
-newkey 'rsa:4096' -keyout 'key.pem' -days '365' -nodes \
-subj "/C=NL/ST=Nederlands/L=Amsterdam/O=Mek Net/OU=Org/CN=mek.info"
Generating a 4096 bit RSA private key
..............................................................................................................................................................................................................................++
...........................................................................................................................................................................++