diff --git a/generate_cert.sh b/generate_cert.sh old mode 100644 new mode 100755 index 36d2bb780..0273c17ca --- a/generate_cert.sh +++ b/generate_cert.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/zsh # generate certificate and key -libressl req -x509 -newkey rsa:4096 -nodes -keyout key.pem -sha256 -days 356 -out cert.pem +openssl req -x509 -newkey rsa:4096 -nodes -keyout key.pem -sha256 -days 356 -out cert.pem diff --git a/server.js b/server.js index 511d2fd4e..2cba267e1 100644 --- a/server.js +++ b/server.js @@ -315,8 +315,8 @@ if (!isLightweightMobile) { let options = { - key: fs.readFileSync('key.pem'), - cert: fs.readFileSync('cert.pem') + key: fs.readFileSync(__dirname + '/key.pem'), + cert: fs.readFileSync(__dirname + '/cert.pem') }; const httpServer = require('https').createServer(options, webServer); const http = httpServer.listen(serverPort, function () {