Skip to content

Commit

Permalink
Use rfc4253.readInternal rather than readPartial
Browse files Browse the repository at this point in the history
  • Loading branch information
arekinath committed Dec 21, 2015
1 parent e7e9d6a commit 6fdf4c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/protocol.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ var PrivateKey = {
},
decodeSize: function (buf, offset) {
var keyBuf = buf.slice(offset);
/* XXX: should find a way to make this faster */
var key = sshpk.PrivateKey.formats.
rfc4253.readPartial('private', keyBuf);
return (key.toBuffer('rfc4253').length);
var ret = {};
sshpk.PrivateKey.formats.rfc4253.
readInternal(ret, 'private', keyBuf);
return (ret.consumed);
},
decode: function (buf, offset) {
var size = PrivateKey.decodeSize(buf, offset);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sshpk-agent",
"version": "1.2.0",
"version": "1.2.1",
"description": "ssh-agent client for use with sshpk",
"main": "lib/index.js",
"scripts": {
Expand Down

0 comments on commit 6fdf4c0

Please sign in to comment.