Skip to content

Commit 3a000e9

Browse files
committed
bug: strip padding from imported jwk key values
1 parent 674f2d3 commit 3a000e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/vapid.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ var vapid = {
183183
ext: true,
184184
key_ops: ["verify"],
185185
kty: "EC",
186-
x: x,
187-
y, y
186+
x: x.replace('=', ''), // Current fashion, strip padding
187+
y: y.replace('=', ''),
188188
};
189189

190190
return webCrypto.importKey('jwk', jwk, 'ECDSA', true, ["verify"])

0 commit comments

Comments
 (0)