@electerm/ssh2 1.16.0 → 1.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/client.js +2 -12
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -461,18 +461,8 @@ class Client extends EventEmitter {
461
461
  });
462
462
  });
463
463
  } else if (curAuth.type === 'publickey') {
464
- proto.authPK(curAuth.username, curAuth.key, (buf, cb) => {
465
- let signatureAlgo;
466
- if (curAuth.key.type === 'ssh-rsa') {
467
- if (this._protocol._remoteHostKeyAlgorithms
468
- .includes('rsa-sha2-512')) {
469
- signatureAlgo = 'sha512';
470
- } else if (this._protocol._remoteHostKeyAlgorithms
471
- .includes('rsa-sha2-256')) {
472
- signatureAlgo = 'sha256';
473
- }
474
- }
475
- const signature = curAuth.key.sign(buf, signatureAlgo);
464
+ proto.authPK(curAuth.username, curAuth.key, keyAlgo, (buf, cb) => {
465
+ const signature = curAuth.key.sign(buf, hashAlgo);
476
466
  if (signature instanceof Error) {
477
467
  signature.message =
478
468
  `Error signing data with key: ${signature.message}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@electerm/ssh2",
3
- "version": "1.16.0",
3
+ "version": "1.16.1",
4
4
  "author": "Brian White <mscdex@mscdex.net>",
5
5
  "description": "SSH2 client and server modules written in pure JavaScript for node.js",
6
6
  "main": "./lib/index.js",