diff --git a/Makefile b/Makefile index e2d5035..609ec04 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ # Get md2man-roff from MD2MAN := md2man-roff NPM_EXEC := npm -TAP := ./node_modules/.bin/tape +TAP := ./node_modules/tape/bin/tape # # Files diff --git a/deps/javascriptlint b/deps/javascriptlint index ad52812..a365abe 160000 --- a/deps/javascriptlint +++ b/deps/javascriptlint @@ -1 +1 @@ -Subproject commit ad52812e77bdfb1e90fb71a1201adb2b665a27e6 +Subproject commit a365abebde31d1f7cc57741f365a3025dc4527ca diff --git a/lib/formats/putty.js b/lib/formats/putty.js index ab62948..e7b2add 100644 --- a/lib/formats/putty.js +++ b/lib/formats/putty.js @@ -27,8 +27,8 @@ function read(buf, options) { if (parts) { formatVersion = { 'putty-user-key-file-2': 2, - 'putty-user-key-file-3': 3, - }[parts[0].toLowerCase()] + 'putty-user-key-file-3': 3 + }[parts[0].toLowerCase()]; if (formatVersion) { found = true; break; @@ -78,7 +78,8 @@ function read(buf, options) { lines.slice(si, si + privateLines).join(''), 'base64'); if (encryption !== 'none' && formatVersion === 3) { - throw new Error('Encrypted keys arenot supported for PuTTY format version 3'); + throw new Error('Encrypted keys arenot supported for' + + ' PuTTY format version 3'); } if (encryption === 'aes256-cbc') { @@ -116,7 +117,7 @@ function read(buf, options) { { name: 'q', data: sshbuf.readBuffer() }, { name: 'iqmp', data: sshbuf.readBuffer() } ]; - } else if (alg.startsWith('ecdsa-sha2-nistp')) { + } else if (alg.match(/^ecdsa-sha2-nistp/)) { privateKeyParts = [ { name: 'd', data: sshbuf.readBuffer() } ]; diff --git a/package.json b/package.json index cc78787..967a8d3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sshpk", - "version": "1.16.1", + "version": "1.17.0", "description": "A library for finding and using SSH public keys", "main": "lib/index.js", "scripts": {