diff --git a/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/HttpOpnsense.php b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/HttpOpnsense.php index c7a1672e3..7c133f44b 100644 --- a/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/HttpOpnsense.php +++ b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/HttpOpnsense.php @@ -50,7 +50,7 @@ class HttpOpnsense extends Base implements LeValidationInterface $iplist = array(); // Add IP addresses from auto-discovery feature - if ($this->config->http_opn_autodiscovery == 1) { + if ($this->config->http_opn_autodiscovery == '1') { $dnslist = explode(',', $this->cert_altnames); $dnslist[] = $this->cert_name; foreach ($dnslist as $fqdn) { @@ -73,9 +73,9 @@ class HttpOpnsense extends Base implements LeValidationInterface // Add IP address from chosen interface if (!empty((string)$this->config->http_opn_interface)) { $backend = new \OPNsense\Core\Backend(); - $response = $backend->configdpRun('interface address', [(string)$this->config->http_opn_interface]); - if (!empty($response['address'])) { - $iplist[] = $response['address']; + $response = json_decode($backend->configdpRun('interface address', [(string)$this->config->http_opn_interface])); + if (!empty($response->address)) { + $iplist[] = $response->address; } } diff --git a/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/TlsalpnAcme.php b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/TlsalpnAcme.php index f849ffd40..d0fbbfd9c 100644 --- a/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/TlsalpnAcme.php +++ b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/TlsalpnAcme.php @@ -51,7 +51,7 @@ class TlsalpnAcme extends Base implements LeValidationInterface $iplist = array(); // Add IP addresses from auto-discovery feature - if ($this->config->tlsalpn_acme_autodiscovery == 1) { + if ($this->config->tlsalpn_acme_autodiscovery == '1') { $dnslist = explode(',', $this->cert_altnames); $dnslist[] = $this->cert_name; foreach ($dnslist as $fqdn) { @@ -74,9 +74,9 @@ class TlsalpnAcme extends Base implements LeValidationInterface // Add IP address from chosen interface if (!empty((string)$this->config->tlsalpn_acme_interface)) { $backend = new \OPNsense\Core\Backend(); - $response = $backend->configdpRun('interface address', [(string)$this->config->tlsalpn_acme_interface]); - if (!empty($response['address'])) { - $iplist[] = $response['address']; + $response = json_decode($backend->configdpRun('interface address', [(string)$this->config->tlsalpn_acme_interface])); + if (!empty($response->address)) { + $iplist[] = $response->address; } }