Socket
Socket
Sign inDemoInstall

parse-asn1

Package Overview
Dependencies
20
Maintainers
4
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.1.5 to 5.1.6

6

fixProc.js
// adapted from https://github.com/apatil/pemstrip
var findProc = /Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m
var findProc = /Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m
var startRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m
var fullRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r\+\/\=]+)-----END \1-----$/m
var fullRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m
var evp = require('evp_bytestokey')

@@ -14,3 +14,3 @@ var ciphers = require('browserify-aes')

var match2 = key.match(fullRegex)
decrypted = new Buffer(match2[2].replace(/[\r\n]/g, ''), 'base64')
decrypted = Buffer.from(match2[2].replace(/[\r\n]/g, ''), 'base64')
} else {

@@ -17,0 +17,0 @@ var suite = 'aes' + match[1]

@@ -50,3 +50,3 @@ var asn1 = require('./asn1')

}
throw new Error('unknown key type ' + type)
// throw new Error('unknown key type ' + type)
case 'ENCRYPTED PRIVATE KEY':

@@ -75,3 +75,3 @@ data = asn1.EncryptedPrivateKey.decode(data, 'der')

}
throw new Error('unknown key type ' + type)
// throw new Error('unknown key type ' + type)
case 'RSA PUBLIC KEY':

@@ -78,0 +78,0 @@ return asn1.RSAPublicKey.decode(data, 'der')

{
"name": "parse-asn1",
"version": "5.1.5",
"version": "5.1.6",
"description": "utility library for parsing asn1 files for use with browserify-sign.",

@@ -25,5 +25,4 @@ "main": "index.js",

"dependencies": {
"asn1.js": "^4.0.0",
"asn1.js": "^5.2.0",
"browserify-aes": "^1.0.0",
"create-hash": "^1.1.0",
"evp_bytestokey": "^1.0.0",

@@ -34,5 +33,5 @@ "pbkdf2": "^3.0.3",

"devDependencies": {
"tape": "^3.4.0",
"standard": "^5.0.0"
"standard": "^14.3.4",
"tape": "^5.0.1"
}
}
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