PHP 8.2.30
Preview: load-cafile.js Size: 682 B
/proc/thread-self/root/proc/thread-self/root/lib/node_modules/npm/lib/config/load-cafile.js

module.exports = loadCAFile

var fs = require('fs')

function loadCAFile (cafilePath, cb) {
  if (!cafilePath) return process.nextTick(cb)

  fs.readFile(cafilePath, 'utf8', afterCARead.bind(this))

  function afterCARead (er, cadata) {
    if (er) {
      // previous cafile no longer exists, so just continue on gracefully
      if (er.code === 'ENOENT') return cb()
      return cb(er)
    }

    var delim = '-----END CERTIFICATE-----'
    var output

    output = cadata
      .split(delim)
      .filter(function (xs) {
        return !!xs.trim()
      })
      .map(function (xs) {
        return xs.trimLeft() + delim
      })

    this.set('ca', output)
    cb(null)
  }
}

Directory Contents

Dirs: 0 × Files: 14

Name Size Perms Modified Actions
716 B lrw-r--r-- 2021-03-10 14:36:36
Edit Download
423 B lrw-r--r-- 2021-03-10 14:36:36
Edit Download
2.17 KB lrw-r--r-- 2021-03-10 14:36:36
Edit Download
10.90 KB lrw-r--r-- 2021-03-10 14:36:36
Edit Download
11.45 KB lrw-r--r-- 2021-03-10 14:36:36
Edit Download
2.31 KB lrw-r--r-- 2021-03-10 14:36:36
Edit Download
687 B lrw-r--r-- 2021-03-10 14:36:36
Edit Download
2.16 KB lrw-r--r-- 2021-03-10 14:36:36
Edit Download
851 B lrw-r--r-- 2021-03-10 14:36:36
Edit Download
682 B lrw-r--r-- 2021-03-10 14:36:36
Edit Download
1.30 KB lrw-r--r-- 2021-03-10 14:36:36
Edit Download
471 B lrw-r--r-- 2021-03-10 14:36:36
Edit Download
1.24 KB lrw-r--r-- 2021-03-10 14:36:36
Edit Download
758 B lrw-r--r-- 2021-03-10 14:36:36
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).