asic-verify
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -0,1 +1,2 @@ | ||
#!/usr/bin/env node | ||
"use strict"; | ||
@@ -2,0 +3,0 @@ |
@@ -9,3 +9,3 @@ "use strict"; | ||
}); | ||
assert.equal(entry.length, 1, "Could not find exactly one entry for " + fn); | ||
assert.equal(entry.length, 1, `Could not find exactly one entry for ${fn}`); | ||
return entry[0]; | ||
@@ -12,0 +12,0 @@ } |
@@ -49,6 +49,6 @@ "use strict"; | ||
var entriesNotInZip = _.difference(entriesInManifest, entriesInZip).join(","); | ||
assert(!entriesNotInZip, "Entries not present in zip: " + entriesNotInZip); | ||
assert(!entriesNotInZip, `Entries not present in zip: ${entriesNotInZip}`); | ||
var entriesNotInManifest = _.difference(entriesInZip, entriesInManifest).join(","); | ||
assert(!entriesNotInManifest, "Entries not present in manifest: " + entriesNotInManifest); | ||
assert(!entriesNotInManifest, `Entries not present in manifest: ${entriesNotInManifest}`); | ||
}); | ||
@@ -55,0 +55,0 @@ } |
@@ -38,3 +38,3 @@ "use strict"; | ||
.then(function (mimetype) { | ||
assert.equal(mimetype, "application/vnd.etsi.asic-e+zip", "Unexpected mimetype: " + mimetype); | ||
assert.equal(mimetype, "application/vnd.etsi.asic-e+zip", `Unexpected mimetype: ${mimetype}`); | ||
}); | ||
@@ -41,0 +41,0 @@ |
@@ -18,7 +18,7 @@ "use strict"; | ||
function verifyEntryDigest(zipfile, entry, entryReference) { | ||
assert.equal(entryReference["DigestMethod"].length, 1, "Unexpected number of <DigestMethod> items in reference for " + entry.fileName); | ||
assert.equal(entryReference["DigestValue"].length, 1, "Unexpected number of <DigestValue> items in reference for " + entry.fileName); | ||
assert.equal(entryReference["DigestMethod"].length, 1, `Unexpected number of <DigestMethod> items in reference for ${entry.fileName}`); | ||
assert.equal(entryReference["DigestValue"].length, 1, `Unexpected number of <DigestValue> items in reference for ${entry.fileName}`); | ||
var algorithm = entryReference["DigestMethod"][0].$["Algorithm"]; | ||
assert.equal(algorithm, "http://www.w3.org/2001/04/xmlenc#sha256", "Unexpected algorithm: " + algorithm); | ||
assert.equal(algorithm, "http://www.w3.org/2001/04/xmlenc#sha256", `Unexpected algorithm: ${algorithm}`); | ||
@@ -29,3 +29,3 @@ var digestValue = entryReference["DigestValue"][0]; | ||
.then(function (shasum) { | ||
assert.equal(shasum, digestValue, "Digest mismatch: " + entry.fileName); | ||
assert.equal(shasum, digestValue, `Digest mismatch: ${entry.fileName}`); | ||
}); | ||
@@ -59,6 +59,6 @@ } | ||
var entriesNotInZip = _.difference(fileEntriesInReference, entriesInZip).join(","); | ||
assert(!entriesNotInZip, "Entries not present in zip: " + entriesNotInZip); | ||
assert(!entriesNotInZip, `Entries not present in zip: ${entriesNotInZip}`); | ||
var entriesNotInReference = _.difference(entriesInZip, fileEntriesInReference).join(","); | ||
assert(!entriesNotInReference, "Entries not present in signature reference: " + entriesNotInReference); | ||
assert(!entriesNotInReference, `Entries not present in signature reference: ${entriesNotInReference}`); | ||
@@ -65,0 +65,0 @@ // validate shasums for digested files |
{ | ||
"name": "asic-verify", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Verify ASiC (Associated Signature Container)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
11233
269
0