This repository has been archived by the owner on Aug 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 175
TypeError: Invalid hex string in aadutils.js #117
Comments
dhodgin
changed the title
TypeError: Invalid hex string
TypeError: Invalid hex string in aadutils.js
Jun 10, 2016
Found the problem. It's the ES6 template strings spanning multiple lines for both the encodedPubkey and the final pem string. extra spaces are inserted into the pem certificate which then fails to read properly The invalid hex string error is caused by encoded Pubkey having whitespace. Once that's fixed you get Logging the pem certificate shows it will look like this:
I changed a few of the chars above to invalidate my actual cert that was generated note the 4 spaces inserted at the start of the string and the newlines between begin and end the function has strict requirements that the cert contain the begin line, 64 chars per line, and end line PR coming soon... |
dhodgin
added a commit
to dhodgin/passport-azure-ad
that referenced
this issue
Jun 10, 2016
dhodgin
added a commit
to dhodgin/passport-azure-ad
that referenced
this issue
Jun 10, 2016
dhodgin
added a commit
to dhodgin/passport-azure-ad
that referenced
this issue
Jun 10, 2016
brandwe
added a commit
that referenced
this issue
Jun 10, 2016
fix whitespacing issue in rsaPublicKeyPem in aadutils.js fixes #117
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When using the BearerStrategy the code fails inside
rsaPublicKeyPem
when trying to generate the pem certseems to happen here:
The text was updated successfully, but these errors were encountered: