From e3b681e90490188be61ab1e7045668d40ec80375 Mon Sep 17 00:00:00 2001 From: raul Date: Tue, 14 May 2024 09:06:24 +0200 Subject: [PATCH] Add gen-cert.sh --- cmd/gen-cert.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 cmd/gen-cert.sh diff --git a/cmd/gen-cert.sh b/cmd/gen-cert.sh new file mode 100755 index 0000000..d5b25f2 --- /dev/null +++ b/cmd/gen-cert.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SSLCOMMAND=$(which openssl) + +echo "[+] Generating server.key..." +$SSLCOMMAND genrsa -out server.key 2048 + +echo "[+] Generating server.crt..." +$SSLCOMMAND req -new -x509 -sha256 -key server.key -out server.crt -days 3650 -subj "/C=ES/ST=Valencia/L=Valencia/O=mini-chat /OU=mini-chat/CN=mini-chat" + +echo "[+] Success!"