CSI-ES-2324/TPs/TP06
2024-03-19 23:18:33 +00:00
..
CA [TP06] Finished 2024-03-19 23:02:05 +00:00
client [TP06] Finished 2024-03-19 23:02:05 +00:00
server [TP06] Fix e QOL 2024-03-19 23:18:33 +00:00
.gitignore Initial commit 2024-02-19 10:37:29 +00:00
client.py [TP06] Fix e QOL 2024-03-19 23:18:33 +00:00
README.md [TP06] Finished 2024-03-19 23:02:05 +00:00
server.py [TP06] Fix e QOL 2024-03-19 23:18:33 +00:00

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