blob: 7cd92f94e46908efc3b1660e7b46e0fc4f4c0375 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# OpenSSL with CA
1. Generate private key for CA.
2. Generate CA certificate with CA private key.
3. Generate private key for the application.
4. Create certificate signing request (CSR) for the application.
5. Sign the CSR with the CA certificate and CA private key.
## Generate private key for CA
```
openssl genrsa -out ca.key 4096
```
## Generate CA certificate
```
openssl req -new -x509 -key ca.key -out ca.crt
```
## Generate app private key
```
openssl genrsa -out app.key 4096
```
## Generate CSR
```
openssl req -new -key app.key -out app.csr
```
## Sign CSR
```
openssl x509 -req -in app.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out app.crt
```
|