security/acme-client: remove the legacy log file, refs #2366

This commit is contained in:
Frank Wall
2021-08-04 12:20:11 +02:00
parent 53b20d2a17
commit 1e0e4dc323
3 changed files with 8 additions and 7 deletions
+1
View File
@@ -17,6 +17,7 @@ Changed:
* rename plugin from "Let's Encrypt client" to "ACME Client" (#2361)
* rename "Let's Encrypt Environment" to "ACME CA" (#2361)
* preserve old LE accounts/certs by adding a compatibility layer (#2361)
* remove the legacy log file and only rely on syslog logging (#2366)
Removed:
* remove obsolete account parameters: certificateAuthority, lastUpdate
@@ -73,7 +73,7 @@ class LeAccount extends LeCommon
$account_ca_file = $account_conf_dir . '/ca.conf';
$acme_conf = array();
$acme_conf[] = "CERT_HOME='" . self::ACME_HOME_DIR . "'";
$acme_conf[] = "LOG_FILE='" . self::ACME_LOG_FILE . "'";
$acme_conf[] = "SYS_LOG='" . $this->acme_syslog . "'";
$acme_conf[] = "ACCOUNT_KEY_PATH='" . $account_key_file . "'";
$acme_conf[] = "ACCOUNT_JSON_PATH='" . $account_json_file . "'";
$acme_conf[] = "CA_CONF='" . $account_ca_file . "'";
@@ -42,7 +42,6 @@ abstract class LeCommon
public const ACME_BASE_CERT_DIR = '/var/etc/acme-client/certs';
public const ACME_BASE_CONFIG_DIR = '/var/etc/acme-client/configs';
public const ACME_HOME_DIR = '/var/etc/acme-client/home';
public const ACME_LOG_FILE = '/var/log/acme.sh.log';
// Defaults for acme.sh
public const ACME_ACCOUNT_KEY_LENGTH = 4096;
@@ -61,6 +60,7 @@ abstract class LeCommon
protected $acme_args = array(); # command line arguments to be passed to acme.sh
protected $acme_env = array(); # environment variables to be used when running acme.sh
protected $acme_keylength; # private key length in acme.sh compatible format
protected $acme_syslog; # syslog log level
// Certificate details and configuration
protected $cert_id; # AcmeClient certificate object ID
@@ -173,34 +173,34 @@ abstract class LeCommon
case 'extended':
$this->acme_args[] = '--syslog 6';
$this->acme_args[] = '--log-level 2';
$this->acme_syslog = 6;
$this->debug = false;
break;
case 'debug':
$this->acme_args[] = '--syslog 7';
$this->acme_args[] = '--debug';
$this->acme_syslog = 7;
$this->debug = true;
break;
case 'debug2':
$this->acme_args[] = '--syslog 7';
$this->acme_args[] = '--debug 2';
$this->acme_syslog = 7;
$this->debug = true;
break;
case 'debug3':
$this->acme_args[] = '--syslog 7';
$this->acme_args[] = '--debug 3';
$this->acme_syslog = 7;
$this->debug = true;
break;
default:
$this->acme_args[] = '--syslog 6';
$this->acme_args[] = '--log-level 1';
$this->acme_syslog = 6;
$this->debug = false;
break;
}
// Set log file
// NOTE: This log file is no longer exposed to the GUI. However, it may
// still turn out to be useful for debug purposes in rare egde cases.
$this->acme_args[] = LeUtils::execSafe('--log %s', self::ACME_LOG_FILE);
}
/**