From 45f658fedbe205811146b2762e90756de2ce398b Mon Sep 17 00:00:00 2001 From: Alexander Cerutti Date: Thu, 7 Jun 2018 01:19:43 +0200 Subject: [PATCH] Removed checkSignatureRequirements function --- index.js | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/index.js b/index.js index 7f8efa9..2613952 100644 --- a/index.js +++ b/index.js @@ -113,25 +113,6 @@ function fileStreamToBuffer(path, ...callbacks) { .on("error", (e) => callbacks[Number(callbacks.length > 1)](e)); } -/** - Checks if the certificate and the key files originated from che .p12 file are available - - @function checkSignatureRequirements - @returns {Object} Promise -*/ - -function checkSignatureRequirements() { - let checkCertificate = new Promise(function(available, notAvailable) { - fs.access(path.resolve(Certificates.dir, Certificates.files.signerCert), (e) => (!!e ? notAvailable : available)() ); - }); - - let checkKey = new Promise(function(available, notAvailable) { - fs.access(path.resolve(Certificates.dir, Certificates.files.signerKey), (e) => (!!e ? notAvailable : available)() ); - }); - - return Promise.all([checkCertificate, checkKey]); -} - /** Generates the cryptografic signature for the manifest file. Spawns Openssl process since Node.js has no support for PKCSs.