Skip to content

Commit

Permalink
Fixing CSR subject generation (#90)
Browse files Browse the repository at this point in the history
The apostrophe character is wrongly being removed from the subject even
though it is valid in an organization name, thus preventing certificate generation by CA. This fix allows the
apostrophe character.
  • Loading branch information
adematte authored and Dexus committed Nov 6, 2016
1 parent 9ae5ff0 commit cd763a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pem.js
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ function generateCSRSubject(options) {

var csrBuilder = Object.keys(csrData).map(function(key) {
if (csrData[key]) {
return '/' + key + '=' + csrData[key].replace(/[^\w \.\*\-\,@]+/g, ' ').trim();
return '/' + key + '=' + csrData[key].replace(/[^\w \.\*\-\,@']+/g, ' ').trim();
}
});

Expand Down

0 comments on commit cd763a2

Please sign in to comment.