cert: add some asserts
This commit is contained in:
@@ -369,6 +369,9 @@ async function updateCertBlobs(fqdn, domainObject) {
|
||||
}
|
||||
|
||||
async function needsRenewal(fqdn, domainObject) {
|
||||
assert.strictEqual(typeof fqdn, 'string');
|
||||
assert.strictEqual(typeof domainObject, 'object');
|
||||
|
||||
const apiOptions = await getAcmeApiOptions(domainObject);
|
||||
const { certFilePath } = getAcmeCertificatePathSync(fqdn, domainObject);
|
||||
|
||||
@@ -380,6 +383,9 @@ async function needsRenewal(fqdn, domainObject) {
|
||||
}
|
||||
|
||||
async function renewCert(fqdn, domainObject) {
|
||||
assert.strictEqual(typeof fqdn, 'string');
|
||||
assert.strictEqual(typeof domainObject, 'object');
|
||||
|
||||
const apiOptions = await getAcmeApiOptions(domainObject);
|
||||
const acmePaths = getAcmeCertificatePathSync(fqdn, domainObject);
|
||||
|
||||
@@ -577,6 +583,10 @@ async function writeAppConfigs(app) {
|
||||
}
|
||||
|
||||
async function setUserCertificate(app, fqdn, certificate) {
|
||||
assert.strictEqual(typeof app, 'object');
|
||||
assert.strictEqual(typeof fqdn, 'string');
|
||||
assert.strictEqual(typeof certificate, 'object');
|
||||
|
||||
const { certFilePath, keyFilePath } = getUserCertificatePathSync(fqdn);
|
||||
|
||||
if (certificate !== null) {
|
||||
|
||||
Reference in New Issue
Block a user