host.cert and host.key are not used anymore

This commit is contained in:
Girish Ramakrishnan
2018-01-30 11:58:26 -08:00
parent fd913de913
commit c84f84b9fe
+4 -10
View File
@@ -170,11 +170,8 @@ function renewAll(auditSource, callback) {
debug('renewAll: using fallback certs for %s since it expires soon', domain, error);
// if no cert was returned use fallback, the fallback provider will not provide any for example
var fallbackCertFilePath = path.join(paths.NGINX_CERT_DIR, domain + '.host.cert');
var fallbackKeyFilePath = path.join(paths.NGINX_CERT_DIR, domain + '.host.key');
certFilePath = fs.existsSync(fallbackCertFilePath) ? fallbackCertFilePath : 'cert/host.cert';
keyFilePath = fs.existsSync(fallbackKeyFilePath) ? fallbackKeyFilePath : 'cert/host.key';
certFilePath = path.join(paths.NGINX_CERT_DIR, domain + '.host.cert');
keyFilePath = path.join(paths.NGINX_CERT_DIR, domain + '.host.key');
} else {
debug('renewAll: certificate for %s renewed', domain);
}
@@ -343,11 +340,8 @@ function ensureCertificate(app, callback) {
// if no cert was returned use fallback, the fallback provider will not provide any for example
if (!certFilePath || !keyFilePath) {
var fallbackCertFilePath = path.join(paths.NGINX_CERT_DIR, `${app.domain}.host.cert`);
var fallbackKeyFilePath = path.join(paths.NGINX_CERT_DIR, `${app.domain}.host.key`);
certFilePath = fs.existsSync(fallbackCertFilePath) ? fallbackCertFilePath : 'cert/host.cert';
keyFilePath = fs.existsSync(fallbackKeyFilePath) ? fallbackKeyFilePath : 'cert/host.key';
certFilePath = path.join(paths.NGINX_CERT_DIR, `${app.domain}.host.cert`);
keyFilePath = path.join(paths.NGINX_CERT_DIR, `${app.domain}.host.key`);
}
callback(null, certFilePath, keyFilePath);