mirror of
https://github.com/opnsense/plugins.git
synced 2026-02-03 20:40:37 -05:00
security/acme-client: fallback display name for certs with no CN
This commit is contained in:
parent
20ff8e5af4
commit
f2a122bdc8
1 changed files with 6 additions and 1 deletions
|
|
@ -226,7 +226,12 @@ class LeCertificate extends LeCommon
|
|||
$cert = array();
|
||||
$cert['refid'] = uniqid();
|
||||
$cert['caref'] = (string)$ca['refid'];
|
||||
$cert['descr'] = (string)$cert_cn . ' (ACME Client)';
|
||||
if (empty($cert_cn)) {
|
||||
// Fallback to configured name if Common Name is empty (e.g. for IP certificates)
|
||||
$cert['descr'] = (string)$this->config->name . ' (ACME Client)';
|
||||
} else {
|
||||
$cert['descr'] = (string)$cert_cn . ' (ACME Client)';
|
||||
}
|
||||
$import_log_message = 'imported';
|
||||
$cert_found = false;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue