lib/cert.js
function _checkRootCA () {
  var caKeyFilePath = path.join(certDir, 'ca.key');
  var caCrtFilePath = path.join(certDir, 'ca.crt');

  var keysDir = path.join(__dirname, '..', 'keys');

  if (!fs.existsSync(caKeyFilePath) || !fs.existsSync(caCrtFilePath)) {
    log.debug('CA files do not exist');
    log.debug('Copy CA files');
    fse.copySync(path.join(keysDir, 'ca.key'), caKeyFilePath);
    fse.copySync(path.join(keysDir, 'ca.crt'), caCrtFilePath);
  }
}
function _checkRootCA () {
  var caKeyFilePath = path.join(certDir, 'ca.key');
  var caCrtFilePath = path.join(certDir, 'ca.crt');

  var keysDir = path.join(__dirname, '..', 'keys');

  if (!fs.existsSync(caKeyFilePath) || !fs.existsSync(caCrtFilePath)) {
    log.debug('CA files do not exist');
    log.debug('Copy CA files');
    fse.copySync(path.join(keysDir, 'ca.key'), caKeyFilePath);
    fse.copySync(path.join(keysDir, 'ca.crt'), caCrtFilePath);
  }
}
function _checkRootCA ( ) { var caKeyFilePath = path . join ( certDir , 'ca.key' ) ; var caCrtFilePath = path . join ( certDir , 'ca.crt' ) ; var keysDir = path . join ( __dirname , '..' , 'keys' ) ; if ( ! fs . existsSync ( caKeyFilePath ) || ! fs . existsSync ( caCrtFilePath ) ) { log . debug ( 'CA files do not exist' ) ; log . debug ( 'Copy CA files' ) ; fse . copySync ( path . join ( keysDir , 'ca.key' ) , caKeyFilePath ) ; fse . copySync ( path . join ( keysDir , 'ca.crt' ) , caCrtFilePath ) ; } }
Check the ca files

Copy them if they does not exist
Check the ca files