Added a script to generate the certificates

This commit is contained in:
Alexander Trost
2015-10-18 11:51:32 +02:00
parent 0f865c1a19
commit 4c57150511
2 changed files with 14 additions and 0 deletions

View File

@@ -9,3 +9,4 @@ TODO.md
includes/postgresql-9.3-tsearch-extras
includes/zulip-puppet-config
docker-compose.yml
scripts/

13
scripts/generate_certs.sh Normal file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
command -v openssl >/dev/null 2>&1 || { echo >&2 "openssl package not installed. Aborting."; exit 1; }
openssl genrsa -des3 -passout pass:x -out server.pass.key 4096
openssl rsa -passin pass:x -in server.pass.key -out zulip.key
rm -f server.pass.key
openssl req -new -key zulip.key -out server.csr
openssl x509 -req -days 365 -in server.csr -signkey zulip.key -out zulip.combined-chain.crt
rm -f server.csr
echo "Copy the following files to the docker-zulip data folder:"
echo "* zulip.key"
echo "* zulip.combined-chain.crt"