code: function createKeys (cb) {
    mkdirp(CONFIG_DIR, function (err) {
      if (err) return cb(err)
  
      fs.readdir(CONFIG_DIR, function (err, files) {
        if (err) return cb(err)
        var keys = {}
  
        // check if both files exist
        if (files.indexOf(KEY_NAME) !== -1 && files.indexOf(CERT_NAME) !== -1) {
          return async.parallel([
            function (done) {
              fs.readFile(CERT_LOCATION, function (err, buf) {
                if (err) return done(err)
                keys.cert = buf
                done()
              })
            },
            function (done) {
              fs.readFile(KEY_LOCATION, function (err, buf) {
                if (err) return done(err)
                keys.key = buf
                done()
              })
            }
          ], function (err) {
            if (err) return cb(err)
            cb(null, keys)
          })
        }
  
        var opts = {
          days: 2048,
          algorithm: 'sha256',
          extensions: [
            {
              name: 'subjectAltName',
              altNames: [
                {
                  type: 2, // DNSName
                  value: 'localhost'
                }
              ]
            }
          ]
        }
  
        selfsigned.generate([{ name: 'commonName', value: 'localhost' }], opts, function (err, keys) {
          if (err) return cb(err)
  
          keys = {
            key: keys.private,
            cert: keys.cert
          }
  
          async.parallel([
            function (done) {
              fs.writeFile(KEY_LOCATION, keys.key, done)
            },
            function (done) {
              fs.writeFile(CERT_LOCATION, keys.cert, done)
            }
          ], function (err) {
            if (err) return cb(err)
            cb(null, keys)
          })
        })
      })
    })
  }
docs: Read keys from ~/.config/bankai, or create new ones if they don't exist.