2017-04-28 18:05:12 +08:00
|
|
|
# generate self-signed certs with no password for the web and socket servers
|
2017-05-02 01:40:54 +08:00
|
|
|
# this script requires that openssl is installed: e.g. sudo apt-get install openssl
|
2017-04-28 18:05:12 +08:00
|
|
|
mkdir tls
|
|
|
|
openssl genrsa -des3 -out tls/server.key 1024
|
|
|
|
openssl req -new -key tls/server.key -out tls/server.csr
|
|
|
|
cp tls/server.key tls/server.key.org
|
|
|
|
openssl rsa -in tls/server.key.org -out tls/server.key
|
2017-05-02 01:40:54 +08:00
|
|
|
openssl x509 -req -days 3650 -in tls/server.csr -signkey tls/server.key -out tls/server.crt
|
2017-04-28 18:05:12 +08:00
|
|
|
echo 'converting to pem'
|
|
|
|
cat tls/server.crt tls/server.key > tls/server.pem
|
|
|
|
echo 'cert complete'
|