diff --git a/index.js b/index.js index 5785372..003473c 100644 --- a/index.js +++ b/index.js @@ -144,6 +144,9 @@ module.exports.create = function (configs) { , keypairs: { checkAsync: function (keypath, format) { + if (!keypath) { + return null; + } return fs.readFileAsync(keypath, 'ascii').then(function (key) { if ('jwk' === format) { return { privateKeyJwk: JSON.parse(key) };