Compare commits

..

1 Commits

Author SHA1 Message Date
bc838df0d1 v1.2.3: bugfix RSA swapped n and e values (private key) 2018-12-09 21:03:38 -07:00
2 changed files with 3 additions and 3 deletions

View File

@ -160,15 +160,15 @@ SSH.parsePublicKey = function (ssh) {
if (3 === els.length) {
ssh.jwk = {
kty: 'RSA'
, n: Enc.bufToUrlBase64(els[2])
, e: Enc.bufToUrlBase64(els[1])
, n: Enc.bufToUrlBase64(els[2])
};
} else {
console.log('len:', els.length);
ssh.jwk = {
kty: 'RSA'
, n: Enc.bufToUrlBase64(els[2])
, e: Enc.bufToUrlBase64(els[1])
, n: Enc.bufToUrlBase64(els[2])
, d: Enc.bufToUrlBase64(els[3])
, p: Enc.bufToUrlBase64(els[5])
, q: Enc.bufToUrlBase64(els[6])

View File

@ -1,6 +1,6 @@
{
"name": "ssh-to-jwk",
"version": "1.2.4",
"version": "1.2.3",
"description": "💯 SSH to JWK in a lightweight, zero-dependency library.",
"homepage": "https://git.coolaj86.com/coolaj86/ssh-to-jwk.js",
"main": "index.js",