sshpk
Advanced tools
Comparing version 1.4.4 to 1.4.5
@@ -31,3 +31,3 @@ // Copyright 2015 Joyent, Inc. | ||
var lines = buf.split('\n'); | ||
var lines = buf.trim().split('\n'); | ||
@@ -38,3 +38,3 @@ var m = lines[0].match(/*JSSTYLED*/ | ||
var m2 = lines[lines.length - 2].match(/*JSSTYLED*/ | ||
var m2 = lines[lines.length - 1].match(/*JSSTYLED*/ | ||
/[-]+[ ]*END ([A-Z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/); | ||
@@ -73,3 +73,3 @@ assert.ok(m2, 'invalid PEM footer'); | ||
/* Chop off the first and last lines */ | ||
lines = lines.slice(0, -2).join(''); | ||
lines = lines.slice(0, -1).join(''); | ||
buf = new Buffer(lines, 'base64'); | ||
@@ -76,0 +76,0 @@ |
{ | ||
"name": "sshpk", | ||
"version": "1.4.4", | ||
"version": "1.4.5", | ||
"description": "A library for finding and using SSH public keys", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
80146