Skip to content

Commit

Permalink
node-sshpk#27 prep for release (#79)
Browse files Browse the repository at this point in the history
Reviewed by: Dan McDonald <danmcd@kebe.com>
  • Loading branch information
bahamat committed Jan 7, 2022
1 parent 1da5a87 commit 3e83664
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -20,7 +20,7 @@
# Get md2man-roff from <https://github.com/sunaku/md2man>
MD2MAN := md2man-roff
NPM_EXEC := npm
TAP := ./node_modules/.bin/tape
TAP := ./node_modules/tape/bin/tape

#
# Files
Expand Down
2 changes: 1 addition & 1 deletion deps/javascriptlint
9 changes: 5 additions & 4 deletions lib/formats/putty.js
Expand Up @@ -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;
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -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()
} ];
Expand Down
2 changes: 1 addition & 1 deletion 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": {
Expand Down

0 comments on commit 3e83664

Please sign in to comment.