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!"