Skip to content

Commit

Permalink
fix: use the correct ECPrivateKey version when importing EC JWK
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Jul 27, 2019
1 parent 188c2c3 commit 24acd20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/help/key_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ const jwkToPem = {
const ECPrivateKey = asn1.get('ECPrivateKey')

return ECPrivateKey.encode({
version: 0,
version: 1,
privateKey: base64url.decodeToBuffer(jwk.d),
parameters: {
type: 'namedCurve',
Expand Down

0 comments on commit 24acd20

Please sign in to comment.