Socket
Socket
Sign inDemoInstall

sshpk

Package Overview
Dependencies
2
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.0 to 1.2.1

20

lib/signature.js

@@ -41,3 +41,3 @@ // Copyright 2015 Joyent, Inc.

case 'rsa':
if (this.type === 'ssh') {
if (format === 'ssh') {
parts.push(new Buffer('ssh-rsa'));

@@ -74,2 +74,7 @@ parts.push(this.part.sig.data);

} else if (format === 'ssh' && this.type === 'ecdsa') {
parts.push(this.part.r.data);
parts.push(this.part.s.data);
var inner = lengthPrefixJoin(parts);
parts = [];
/* XXX: find a more proper way to do this? */

@@ -85,4 +90,3 @@ var curve;

parts.push(new Buffer('ecdsa-sha2-' + curve));
parts.push(this.part.r.data);
parts.push(this.part.s.data);
parts.push(inner);
return (lengthPrefixJoin(parts));

@@ -168,8 +172,6 @@ }

parts = opts.parts = lengthPrefixSplit(data);
if (parts.length === 3) {
var itype = parts.shift().data.toString();
if (!itype.match(/^ecdsa-sha2-/)) {
throw (new SignatureParseError(type,
format));
}
if (parts.length === 2 &&
parts[0].data.toString().match(/^ecdsa-/)) {
parts = opts.parts = lengthPrefixSplit(
parts[1].data);
}

@@ -176,0 +178,0 @@ if (parts.length !== 2)

{
"name": "sshpk",
"version": "1.2.0",
"version": "1.2.1",
"description": "A library for finding and using SSH public keys",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc