Removed checkSignatureRequirements function

This commit is contained in:
Alexander Cerutti
2018-06-07 01:19:43 +02:00
parent ef52c60c78
commit 45f658fedb

View File

@@ -113,25 +113,6 @@ function fileStreamToBuffer(path, ...callbacks) {
.on("error", (e) => callbacks[Number(callbacks.length > 1)](e)); .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. Generates the cryptografic signature for the manifest file.
Spawns Openssl process since Node.js has no support for PKCSs. Spawns Openssl process since Node.js has no support for PKCSs.