Skip to content

Commit

Permalink
Add use-cert-id option
Browse files Browse the repository at this point in the history
  • Loading branch information
tatgean committed May 7, 2017
1 parent ef27fba commit b4ff876
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion util-identities.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ module.exports.findIdentitiesAsync = function (opts, identity) {
.then(function (result) {
return result.split('\n').map(function (line) {
if (line.indexOf(identity) >= 0) {
var identityFound = line.substring(line.indexOf('"') + 1, line.lastIndexOf('"'))
var identityFound = opts['use-cert-id']
? line.substring(line.indexOf(')') + 2, line.indexOf('"') - 1)
: line.substring(line.indexOf('"') + 1, line.lastIndexOf('"'))
debuglog('Identity:', '\n',
'> Name:', identityFound)
return identityFound
Expand Down

0 comments on commit b4ff876

Please sign in to comment.