v1.2.2: handle padding of private key
This commit is contained in:
parent
7a1d0bbe76
commit
b5c919b557
@ -197,7 +197,9 @@ SSH.parsePublicKey = function (ssh) {
|
||||
while (0x00 === y[0]) { y = y.slice(1); }
|
||||
|
||||
if (els[3]) {
|
||||
ssh.jwk.d = Enc.bufToUrlBase64(els[3]);
|
||||
d = els[3];
|
||||
while (0x00 === d[0]) { d = d.slice(1); }
|
||||
ssh.jwk.d = Enc.bufToUrlBase64(d);
|
||||
}
|
||||
ssh.jwk.x = Enc.bufToUrlBase64(x);
|
||||
ssh.jwk.y = Enc.bufToUrlBase64(y);
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ssh-to-jwk",
|
||||
"version": "1.2.1",
|
||||
"version": "1.2.2",
|
||||
"description": "💯 SSH to JWK in a lightweight, zero-dependency library.",
|
||||
"homepage": "https://git.coolaj86.com/coolaj86/ssh-to-jwk.js",
|
||||
"main": "index.js",
|
||||
|
Loading…
x
Reference in New Issue
Block a user