-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix conflicts, add keys generation commands
Signed-off-by: Firas Ghanmi <fghanmi@redhat.com>
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
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,21 @@ | ||
# Generation of ct_server key/cert and CA certficate | ||
|
||
## Commands | ||
|
||
``` | ||
# 1. Generate CA's private key and self-signed certificate | ||
openssl req -x509 -newkey rsa:4096 -days 36500 -nodes -keyout ca.key -out ca.crt -subj "/CN=My CA" | ||
# 2. Generate ct_server's private key and certificate signing request (CSR) | ||
openssl req -newkey rsa:4096 -nodes -keyout tls.key -out server-req.pem -subj "/=Server TLS/OU=Server/CN=*/emailAddress=tls@gmail.com" | ||
# 3. SAN | ||
echo "subjectAltName=DNS:*,DNS:ct_server,IP:0.0.0.0" > server-ext.cnf | ||
# 3. Use CA's private key to sign ct_server's CSR and get back the signed certificate | ||
openssl x509 -req -in server-req.pem -days 60 -CA ca.crt -CAkey ca.key -CAcreateserial -out tls.crt -extfile server-ext.cnf | ||
# 4. Clean-up | ||
rm ca.key ca.srl server-ext.cnf server-req.pem | ||
``` |