[Docs] Add instructions for configuring CA on macOS
@@ -57,13 +57,26 @@ chmod 700 private/
touch index.txt
echo 1000 > serial
openssl genrsa -aes256 -out private/ca.key.pem 4096
+# You need enter a password in the command above
chmod 400 private/ca.key.pem
openssl req -config openssl.cnf -key private/ca.key.pem \
-new -x509 -days 7300 -sha256 -extensions v3_ca \
-out certs/ca.cert.pem
+# You must enter the same password in the previous openssl command
chmod 444 certs/ca.cert.pem
```
+> **Tips**
+>
+> The default `openssl` on macOS doesn't work for the commands above. You must upgrade the `openssl` via Homebrew:
+>
+> ```bash
+> brew install openssl
+> export PATH="/usr/local/Cellar/openssl@3/3.0.1/bin:$PATH"
+> ```
+>
+> The version `3.0.1` might change in the future. Use the actual path from the output of `brew install` command.
+
4. After you answer the question prompts, CA-related files are stored in the `./my-ca` directory. Within that directory:
* `certs/ca.cert.pem` is the public certificate. This public certificates is meant to be distributed to all parties involved.
