Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

asic-verify

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asic-verify - npm Package Compare versions

Comparing version 0.0.0 to 0.1.0

lib/findEntry.js

17

cli.js

@@ -1,1 +0,16 @@

throw new Error("Not implemented");
"use strict";
var fn = process.argv[2];
if (!fn) {
throw new Error("File name not provided");
}
process.on("unhandledRejection", function (err) {
console.warn("Unhandled rejection:", err, "\n", err.stack);
});
require("./index.js")(fn, function (err) {
if (err) throw err;
console.log("OK");
});

@@ -1,3 +0,36 @@

module.exports = function verifyAsic() {
throw new Error("Not implemented");
};
"use strict";
var yauzl = require("yauzl");
var getZipEntries = require("./lib/getZipEntries"),
verifyMimetype = require("./lib/verifyMimetype"),
verifyManifest = require("./lib/verifyManifest"),
verifySignatures = require("./lib/verifySignatures");
function verifyAsic(fn, cb) {
yauzl.open(fn, {autoClose: false}, function (err, zipfile) {
if (err) {
return cb(err);
}
getZipEntries(zipfile)
.then(function (entries) {
return Promise.all([
verifyMimetype(zipfile, entries),
verifyManifest(zipfile, entries),
verifySignatures(zipfile, entries)
]);
})
.then(function () {
cb(null);
})
.catch(function (err) {
cb(err);
})
.then(function () {
zipfile.close();
});
});
}
module.exports = verifyAsic;
{
"name": "asic-verify",
"version": "0.0.0",
"version": "0.1.0",
"description": "Verify ASiC (Associated Signature Container)",
"main": "index.js",
"files": [
"cli.js",
"index.js",
"lib/"
],
"bin": {

@@ -21,3 +26,3 @@ "asic-verify": "./cli.js"

],
"author": "MB H6.LT",
"author": "MB H6.LT <info@lexplano.com>",
"license": "MIT",

@@ -27,3 +32,14 @@ "bugs": {

},
"homepage": "https://github.com/lexplano/asic-verify#readme"
"homepage": "https://github.com/lexplano/asic-verify#readme",
"engines": {
"node": ">=1"
},
"dependencies": {
"concat-stream": "1.x",
"denodeify": "1.x",
"lodash": "3.x",
"q": "1.x",
"xml2js": "0.4.x",
"yauzl": "2.x"
}
}
.idea/.name
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc