Compare commits
1 Commits
81780e5ab1
...
bc838df0d1
Author | SHA1 | Date | |
---|---|---|---|
bc838df0d1 |
@ -160,15 +160,15 @@ SSH.parsePublicKey = function (ssh) {
|
|||||||
if (3 === els.length) {
|
if (3 === els.length) {
|
||||||
ssh.jwk = {
|
ssh.jwk = {
|
||||||
kty: 'RSA'
|
kty: 'RSA'
|
||||||
, n: Enc.bufToUrlBase64(els[2])
|
|
||||||
, e: Enc.bufToUrlBase64(els[1])
|
, e: Enc.bufToUrlBase64(els[1])
|
||||||
|
, n: Enc.bufToUrlBase64(els[2])
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
console.log('len:', els.length);
|
console.log('len:', els.length);
|
||||||
ssh.jwk = {
|
ssh.jwk = {
|
||||||
kty: 'RSA'
|
kty: 'RSA'
|
||||||
, n: Enc.bufToUrlBase64(els[2])
|
|
||||||
, e: Enc.bufToUrlBase64(els[1])
|
, e: Enc.bufToUrlBase64(els[1])
|
||||||
|
, n: Enc.bufToUrlBase64(els[2])
|
||||||
, d: Enc.bufToUrlBase64(els[3])
|
, d: Enc.bufToUrlBase64(els[3])
|
||||||
, p: Enc.bufToUrlBase64(els[5])
|
, p: Enc.bufToUrlBase64(els[5])
|
||||||
, q: Enc.bufToUrlBase64(els[6])
|
, q: Enc.bufToUrlBase64(els[6])
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ssh-to-jwk",
|
"name": "ssh-to-jwk",
|
||||||
"version": "1.2.4",
|
"version": "1.2.3",
|
||||||
"description": "💯 SSH to JWK in a lightweight, zero-dependency library.",
|
"description": "💯 SSH to JWK in a lightweight, zero-dependency library.",
|
||||||
"homepage": "https://git.coolaj86.com/coolaj86/ssh-to-jwk.js",
|
"homepage": "https://git.coolaj86.com/coolaj86/ssh-to-jwk.js",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user