self-signed certificate generation script

pull/23/head
Jean-Louis Huynen 2019-01-10 10:20:42 +01:00
parent 6472ba8a21
commit 9bd32a5cc5
2 changed files with 9 additions and 0 deletions

4
server/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
*.crt
*.csr
*.pem
*.key

5
server/gen_cert.sh Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
openssl genrsa -out server.key 2048
openssl req -sha256 -new -key server.key -out server.csr -subj '/CN=localhost'
openssl x509 -req -sha256 -days 365 -in server.csr -signkey server.key -out server.crt
cat server.crt server.key > server.pem