Add cafile config key
This commit is contained in:
parent
5393734055
commit
398647974c
|
@ -35,6 +35,7 @@ https:
|
|||
keyfile: 'localhost.key'
|
||||
passphrase: ''
|
||||
certfile: 'localhost.cert'
|
||||
cafile: ''
|
||||
|
||||
# Page template values
|
||||
# title goes in the upper left corner, description goes in a <meta> tag
|
||||
|
|
|
@ -37,7 +37,8 @@ var defaults = {
|
|||
domain: "https://localhost",
|
||||
keyfile: "localhost.key",
|
||||
passphrase: "",
|
||||
certfile: "localhost.cert"
|
||||
certfile: "localhost.cert",
|
||||
cafile: ""
|
||||
},
|
||||
io: {
|
||||
domain: "http://localhost",
|
||||
|
|
|
@ -78,10 +78,17 @@ var Server = function () {
|
|||
Config.get("https.keyfile")));
|
||||
var cert = fs.readFileSync(path.resolve(__dirname, "..",
|
||||
Config.get("https.certfile")));
|
||||
var ca = undefined;
|
||||
if (Config.get("https.cafile")) {
|
||||
ca = fs.readFileSync(path.resolve(__dirname, "",
|
||||
Config.get("https.cafile")));
|
||||
}
|
||||
|
||||
var opts = {
|
||||
key: key,
|
||||
cert: cert,
|
||||
passphrase: Config.get("https.passphrase")
|
||||
passphrase: Config.get("https.passphrase"),
|
||||
ca: ca
|
||||
};
|
||||
|
||||
self.https = https.createServer(opts, self.express)
|
||||
|
|
Loading…
Reference in a new issue