From 24acd201b65aac4bb2d09aa610af01c6a12be04b Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Sat, 27 Jul 2019 16:35:39 +0200 Subject: [PATCH] fix: use the correct ECPrivateKey version when importing EC JWK --- lib/help/key_utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/help/key_utils.js b/lib/help/key_utils.js index b88c911dc0..371fc9092f 100644 --- a/lib/help/key_utils.js +++ b/lib/help/key_utils.js @@ -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',