Skip to content

Commit

Permalink
Makes normalizeCerString() handle inserted tabs (#481)
Browse files Browse the repository at this point in the history
This is something that Okta does!
  • Loading branch information
hackerceo authored May 24, 2022
1 parent 380d612 commit 2dddfb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export function inflateString(compressedString: string): string {
* @return {string} A formatted certificate string
*/
function _normalizeCerString(bin: string | Buffer, format: string) {
return bin.toString().replace(/\n/g, '').replace(/\r/g, '').replace(`-----BEGIN ${format}-----`, '').replace(`-----END ${format}-----`, '').replace(/ /g, '');
return bin.toString().replace(/\n/g, '').replace(/\r/g, '').replace(`-----BEGIN ${format}-----`, '').replace(`-----END ${format}-----`, '').replace(/ /g, '').replace(/\t/g, '');
}
/**
* @desc Parse the .cer to string format without line break, header and footer
Expand Down

0 comments on commit 2dddfb4

Please sign in to comment.