Skip to content

Commit 3609bc5

Browse files
committed
fix conflicts, add keys generation commands
Signed-off-by: Firas Ghanmi <[email protected]>
1 parent 2d47d44 commit 3609bc5

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

config/tls/key_cert_generation.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Generation of ct_server key/cert and CA certficate
2+
3+
## Commands
4+
5+
```
6+
# 1. Generate CA's private key and self-signed certificate
7+
openssl req -x509 -newkey rsa:4096 -days 36500 -nodes -keyout ca.key -out ca.crt -subj "/CN=My CA"
8+
9+
# 2. Generate ct_server's private key and certificate signing request (CSR)
10+
openssl req -newkey rsa:4096 -nodes -keyout tls.key -out server-req.pem -subj "/=Server TLS/OU=Server/CN=*/[email protected]"
11+
12+
# 3. SAN
13+
echo "subjectAltName=DNS:*,DNS:ct_server,IP:0.0.0.0" > server-ext.cnf
14+
15+
# 3. Use CA's private key to sign ct_server's CSR and get back the signed certificate
16+
openssl x509 -req -in server-req.pem -days 60 -CA ca.crt -CAkey ca.key -CAcreateserial -out tls.crt -extfile server-ext.cnf
17+
18+
# 4. Clean-up
19+
rm ca.key ca.srl server-ext.cnf server-req.pem
20+
21+
```

0 commit comments

Comments
 (0)