847 B
847 B
Generating keys
- Generate CA key and certificate:
openssl genrsa -aes256 -out CA/CA.key 4096
openssl req -x509 -new -nodes -key CA/CA.key -sha256 -days 1825 -out CA/CA.pem
- Generate server key and CSR:
openssl genrsa -out server/server.key 4096
openssl req -new -key server/server.key -out server/server.csr
- Sign the server CSR with CA:
openssl x509 -req -in server/server.csr -CA CA/CA.pem -CAkey CA/CA.key -CAcreateserial -out server/server.crt -days 1825 -sha256
- Generate client key and CSR:
openssl genrsa -out client/client.key 4096
openssl req -new -key client/client.key -out client/client.csr
- Sign the client CSR with ca CA:
openssl x509 -req -in client/client.csr -CA CA/CA.pem -CAkey CA/CA.key -CAcreateserial -out client/client.crt -days 1825 -sha256