Comparing version 0.1.1 to 0.1.2
@@ -62,22 +62,16 @@ var Socket = require('net').Socket; | ||
} else if (type === SIGN_RESPONSE) { | ||
if (keyType === 'rsa') { | ||
if (!sig) { | ||
siglen <<= 8; | ||
siglen += chunk[i]; | ||
if (++count === 4) { | ||
sig = new Buffer(siglen); | ||
count = 0; | ||
} | ||
} else { | ||
sig[count] = chunk[i]; | ||
if (++count === siglen) { | ||
sock.removeAllListeners('data'); | ||
return sock.destroy(); | ||
} | ||
/* | ||
byte SSH2_AGENT_SIGN_RESPONSE | ||
string signature_blob | ||
*/ | ||
if (!sig) { | ||
siglen <<= 8; | ||
siglen += chunk[i]; | ||
if (++count === 4) { | ||
sig = new Buffer(siglen); | ||
count = 0; | ||
} | ||
} else { | ||
if (!sig) | ||
sig = new Buffer(40); | ||
sig[count] = chunk[i]; | ||
if (++count === 40) { | ||
if (++count === siglen) { | ||
sock.removeAllListeners('data'); | ||
@@ -84,0 +78,0 @@ return sock.destroy(); |
@@ -1381,5 +1381,7 @@ var net = require('net'), | ||
} | ||
privAlgo = signed.toString('ascii', 8, 11); | ||
//privAlgoLen = 4 + privAlgo.length; | ||
signature = signed.slice(15); // skip algoLen + algo + sigLen | ||
privAlgo = pubKeyType; | ||
if (privAlgo === 'rsa') | ||
signature = signed.slice(15); // skip algoLen + algo + sigLen | ||
else | ||
signature = signed; | ||
sigLen = signature.length; | ||
@@ -1450,4 +1452,2 @@ sendSigReq(); | ||
//privAlgoLen = 4 + this._privateKey.type.length; | ||
return sendSigReq(); | ||
@@ -1454,0 +1454,0 @@ } |
{ "name": "ssh2", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"author": "Brian White <mscdex@mscdex.net>", | ||
@@ -4,0 +4,0 @@ "description": "An SSH2 client module written in pure JavaScript for node.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
169587
4205