CSI-ES-2324/TPs/TP06/README.md
2024-03-19 23:02:05 +00:00

847 B

Generating keys

  1. 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
  1. Generate server key and CSR:
openssl genrsa -out server/server.key 4096
openssl req -new -key server/server.key -out server/server.csr
  1. 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
  1. Generate client key and CSR:
openssl genrsa -out client/client.key 4096
openssl req -new -key client/client.key -out client/client.csr
  1. 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