diff --git a/README.md b/README.md index 96b5348..a4cf070 100644 --- a/README.md +++ b/README.md @@ -179,6 +179,7 @@ An example of the `https` or `spdy` option. { cert: 'path/to/cert.pem', key: 'path/to/key.pem', + passphrase: '', ca: 'path/to/ca.pem' } ``` diff --git a/lib/core.js b/lib/core.js index 8aed9c1..556791c 100644 --- a/lib/core.js +++ b/lib/core.js @@ -74,6 +74,10 @@ core.createServer = function (options) { cert: fs.readFileSync(serverOptions.cert) }; + if (serverOptions.passphrase) { + credentials.passphrase = serverOptions.passphrase; + } + if (serverOptions.ca) { serverOptions.ca = !Array.isArray(serverOptions.ca) ? [serverOptions.ca]