Socket
Socket
Sign inDemoInstall

ssh2

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssh2 - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

28

lib/agent.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc