lib/_provisioning/pki.js
function buildCsrSubject (commonName, options) {
  var subject = '/CN=' + commonName
  Object.keys(SUBJECT_ATTRIBUTES).forEach(function (key) {
    if (options[key]) {
      subject = subject + '/' + SUBJECT_ATTRIBUTES[key].name + '=' +
        options[key]
    }
  })
  return subject
}
function buildCsrSubject (commonName, options) {
  var subject = '/CN=' + commonName
  Object.keys(SUBJECT_ATTRIBUTES).forEach(function (key) {
    if (options[key]) {
      subject = subject + '/' + SUBJECT_ATTRIBUTES[key].name + '=' +
        options[key]
    }
  })
  return subject
}
function buildCsrSubject ( commonName , options ) { var subject = '/CN=' + commonName Object . keys ( SUBJECT_ATTRIBUTES ) . forEach ( function ( key ) { if ( options [ key ] ) { subject = subject + '/' + SUBJECT_ATTRIBUTES [ key ] . name + '=' + options [ key ] } } ) return subject }
Convert the X509 subject attributes specified on the command-line into a
flat X509 subject string for use with openssl commands.
@param {String} commonName - The X509 Common Name (CN) specified on the
command line.
@param {Object} [options] - Options to use in generating the CSR and private
key.
@returns {String} The X509 Subject in openssl display format.
Convert the X509 subject attributes specified on the command - line into a flat X509 subject string for use with openssl commands .