1 module.exports = loadCAFile
5 function loadCAFile(cafilePath, cb) {
7 return process.nextTick(cb)
9 fs.readFile(cafilePath, "utf8", afterCARead.bind(this))
11 function afterCARead(er, cadata) {
14 // previous cafile no longer exists, so just continue on gracefully
15 if (er.code === 'ENOENT') return cb()
19 var delim = "-----END CERTIFICATE-----"
24 .filter(function(xs) {
28 return xs.trimLeft() + delim
31 this.set("ca", output)