Comparing version 3.2.2 to 3.3.0-beta.1
@@ -54,3 +54,3 @@ // Generated by LiveScript 1.6.0 | ||
return "Subject\t" + crt.subject.value.map(function(it){ | ||
return it.value[0].value[1].value; | ||
return bufferFrom(it.value[0].value[1].value, 'binary').toString('utf8'); | ||
}).join('/') + "\nValid\t" + crt.valid.value.map(function(it){ | ||
@@ -57,0 +57,0 @@ return it.value; |
// Generated by LiveScript 1.6.0 | ||
var crypto, forge, der2, asn1, toASN1; | ||
var crypto, forge, der2, asn1, toASN1, bufferFrom; | ||
crypto = require('crypto'); | ||
@@ -9,2 +9,5 @@ forge = require('./forge'); | ||
module.exports = dispatch; | ||
bufferFrom = Buffer.from || function(data, encoding){ | ||
return new Buffer(data, encoding); | ||
}; | ||
function hash(it){ | ||
@@ -14,10 +17,14 @@ var sha1; | ||
toASN1(it).subject.value.forEach(function(it){ | ||
var pair; | ||
var pair, unicod; | ||
it = asn1.copy(it); | ||
pair = it.value[0].value[1]; | ||
pair.type = asn1.Type.UTF8; | ||
if (!pair.value) { | ||
return; | ||
} | ||
pair.value = pair.value.trim().toLowerCase().replace(/\s+/g, ' '); | ||
pair.type = asn1.Type.UTF8; | ||
unicod = bufferFrom(pair.value, 'binary').toString('utf8'); | ||
unicod = unicod.trim().replace(/[A-Z]+/g, function(it){ | ||
return it.toLowerCase(); | ||
}).replace(/\s+/g, ' '); | ||
pair.value = bufferFrom(unicod, 'utf8').toString('binary'); | ||
sha1.update(asn1.toDer(it).getBytes(), 'binary'); | ||
@@ -24,0 +31,0 @@ }); |
{ | ||
"name": "win-ca", | ||
"version": "3.2.2", | ||
"version": "3.3.0-beta.1", | ||
"description": "Get Windows System Root certificates", | ||
@@ -35,2 +35,14 @@ "keywords": [ | ||
}, | ||
"mocha": { | ||
"extension": [ | ||
"ls", | ||
"js" | ||
], | ||
"reporter": "dot", | ||
"require": [ | ||
"livescript", | ||
"choma", | ||
"appveyor-mocha" | ||
] | ||
}, | ||
"files": [ | ||
@@ -53,5 +65,5 @@ "lib", | ||
"livescript": "^1.6.0", | ||
"mocha": "^5.2.0", | ||
"mocha": "^6.2.3", | ||
"node-addon-api": "^1.6.3" | ||
} | ||
} |
Known malware
Supply chain riskThis package is malware. We have asked the package registry to remove it.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Known malware
Supply chain riskThis package is malware. We have asked the package registry to remove it.
Found 1 instance in 1 package
316900
685
1