lib/_cli/cli-pki.js
function (command) {
    command.option('--opensslbin <file>',
      'Location of the OpenSSL executable that the command uses. If not ' +
      'specified, the command attempts to find an OpenSSL executable in ' +
      'the current environment path.')
    command.option('-s, --san [value]',
      'add Subject Alternative Name(s) to the CSR', sanOption, [])
    command.option('-P, --passphrase [pass]',
      'Password for the private key. If specified with no value, prompts ' +
      'for the value.')
    Object.keys(pki.SUBJECT_ATTRIBUTES).forEach(function (key) {
      var attributeInfo = pki.SUBJECT_ATTRIBUTES[key]
      var optionName = fieldAsOption(key)
      var optionValue = attributeInfo.optionValue || optionName.toLowerCase()
      command.option('--' + fieldAsOption(key) + ' <' + optionValue + '>',
        attributeInfo.description)
    })
    return command
  }
function (command) {
    command.option('--opensslbin <file>',
      'Location of the OpenSSL executable that the command uses. If not ' +
      'specified, the command attempts to find an OpenSSL executable in ' +
      'the current environment path.')
    command.option('-s, --san [value]',
      'add Subject Alternative Name(s) to the CSR', sanOption, [])
    command.option('-P, --passphrase [pass]',
      'Password for the private key. If specified with no value, prompts ' +
      'for the value.')
    Object.keys(pki.SUBJECT_ATTRIBUTES).forEach(function (key) {
      var attributeInfo = pki.SUBJECT_ATTRIBUTES[key]
      var optionName = fieldAsOption(key)
      var optionValue = attributeInfo.optionValue || optionName.toLowerCase()
      command.option('--' + fieldAsOption(key) + ' <' + optionValue + '>',
        attributeInfo.description)
    })
    return command
  }
function ( command ) { command . option ( '--opensslbin <file>' , 'Location of the OpenSSL executable that the command uses. If not ' + 'specified, the command attempts to find an OpenSSL executable in ' + 'the current environment path.' ) command . option ( '-s, --san [value]' , 'add Subject Alternative Name(s) to the CSR' , sanOption , [ ] ) command . option ( '-P, --passphrase [pass]' , 'Password for the private key. If specified with no value, prompts ' + 'for the value.' ) Object . keys ( pki . SUBJECT_ATTRIBUTES ) . forEach ( function ( key ) { var attributeInfo = pki . SUBJECT_ATTRIBUTES [ key ] var optionName = fieldAsOption ( key ) var optionValue = attributeInfo . optionValue || optionName . toLowerCase ( ) command . option ( '--' + fieldAsOption ( key ) + ' <' + optionValue + '>' , attributeInfo . description ) } ) return command }
Appends options related to the use of PKI utilities to a Commander-based
command.
@param {Command} command - The Commander command to append options
onto.
@returns {Command}
Appends options related to the use of PKI utilities to a Commander - based command .