Skip to content

Commit

Permalink
fix(electron): properly ASN.1 encode [0x00] when converting RSA JWKs
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Mar 2, 2021
1 parent a5a6c4d commit 433f020
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/node/jwk_to_key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const parse: JWKParseFunction = (jwk: JWK): KeyObject => {
const exponent = Buffer.from(jwk.e!, 'base64')

if (isPrivate) {
enc.unsignedInteger(Buffer.from([0x00]))
enc.zero()
enc.unsignedInteger(modulus)
enc.unsignedInteger(exponent)
enc.unsignedInteger(Buffer.from(jwk.d!, 'base64'))
Expand Down

0 comments on commit 433f020

Please sign in to comment.