-
-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #710 from manchoz/add_isgr_root_x1
Add ISGR Root X1 (Let's Encrypt) to CAs
- Loading branch information
Showing
2 changed files
with
198 additions
and
2 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
libraries/STM32H747_System/examples/WiFiFirmwareUpdater/Readme.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Managing CA Certs for TLS connections | ||
|
||
## Generating `certificates.h` from PEM file: | ||
|
||
> [!NOTE] | ||
> Pre-requisites: `xxd` from `vim` packages or standalone | ||
``` | ||
xxd -i cacert.pem -n cacert_pem | sed 's/^unsigned/const unsigned/g' > certificates.h | ||
``` | ||
|
||
## Getting PEM file from `certificates.h` | ||
|
||
> [!NOTE] | ||
> Pre-requisites: `xxd`, GNU Tools (Use g-tools on MacOS: e.g., `gtail`, `ghead`) | ||
``` | ||
cat certificates.h | tail -n +2 | head -n -2 | xxd -r -p > cacert.pem | ||
``` | ||
## Listing certifcates in `certificates.h` | ||
|
||
> [!NOTE] | ||
> Pre-requisites: `openssl` | ||
``` | ||
cat certificates.h | tail -n +2 | head -n -2 | xxd -r -p > cacert.pem | ||
openssl crl2pkcs7 -nocrl -certfile cacert.pem | openssl pkcs7 -print_certs | grep '^subject' | ||
``` | ||
|
||
## Adding a new root certificate to `certificates.h` | ||
|
||
> [!Note] | ||
> The PEM file for the root CA to add, e.g., `new_root.pem` | ||
``` | ||
cat certificates.h | tail -n +2 | head -n -2 | xxd -r -p | cat - new_root.pem | xxd -n cacert_pem -i | sed 's/^unsigned/const unsigned/g' > certificates.h | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters