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.0.2 to 1.0.3

.travis.yml

20

lib/formats/pem.js

@@ -44,4 +44,22 @@ // Copyright 2015 Joyent, Inc.

var headers = {};
while (true) {
lines = lines.slice(1);
m = lines[0].match(/*JSSTYLED*/
/^([A-Za-z0-9-]+): (.+)$/);
if (!m)
break;
headers[m[1].toLowerCase()] = m[2];
}
if (headers['proc-type']) {
var parts = headers['proc-type'].split(',');
if (parts[0] === '4' && parts[1] === 'ENCRYPTED') {
throw (new Error('PEM key is encrypted ' +
'(password-protected). Please use the ' +
'SSH agent or decrypt the key.'));
}
}
/* Chop off the first and last lines */
lines = lines.slice(1, -2).join('');
lines = lines.slice(0, -2).join('');
buf = new Buffer(lines, 'base64');

@@ -48,0 +66,0 @@

10

package.json
{
"name": "sshpk",
"version": "1.0.2",
"version": "1.0.3",
"description": "A library for finding and using SSH public keys",

@@ -37,9 +37,9 @@ "main": "lib/index.js",

"dependencies": {
"asn1": "^0.2.2",
"assert-plus": "^0.1.5"
"asn1": "0.2.2",
"assert-plus": "0.1.5"
},
"devDependencies": {
"tape": "^3.5.0",
"benchmark": "^1.0.0"
"tape": ">=3.5.0 <4.0.0",
"benchmark": ">=1.0.0 <2.0.0"
}
}

@@ -13,3 +13,3 @@ var fs = require('fs');

var key = sk.Key.parse(keyPem, 'pem', './foo');
var key = sk.Key.parse(keyPem, 'pem', './foo.pem');

@@ -16,0 +16,0 @@ console.log('-> using a %d bit %s key', key.size, key.type);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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