setPaths function.

This commit is contained in:
Cyrille 2019-05-09 22:14:51 +01:00
parent 9aae350189
commit 0f5eebd9cc
1 changed files with 9 additions and 5 deletions

View File

@ -3,15 +3,19 @@ const s3 = new AWS.S3({ apiVersion: "2006-03-01" });
const pathHelper = require("../pathHelper"); const pathHelper = require("../pathHelper");
const fileNames = require("../fileNames"); const fileNames = require("../fileNames");
module.exports.check = (opts, options) => { const setPaths = (opts, options, id) => {
const id = opts.certificate && opts.certificate.id || opts.subject; return [
console.log("certificates.check for", opts.subject);
let paths = [
pathHelper.certificatesPath(options, id, fileNames.privkey.pem) pathHelper.certificatesPath(options, id, fileNames.privkey.pem)
, pathHelper.certificatesPath(options, id, fileNames.cert) , pathHelper.certificatesPath(options, id, fileNames.cert)
, pathHelper.certificatesPath(options, id, fileNames.chain) , pathHelper.certificatesPath(options, id, fileNames.chain)
] ]
};
module.exports.check = (opts, options) => {
const id = opts.certificate && opts.certificate.id || opts.subject;
console.log("certificates.check for", opts.subject);
const paths = setPaths(opts, options, id);
var promises = []; var promises = [];