diff --git a/security/stunnel/Makefile b/security/stunnel/Makefile index 87786dae3..d3215d794 100644 --- a/security/stunnel/Makefile +++ b/security/stunnel/Makefile @@ -1,5 +1,6 @@ PLUGIN_NAME= stunnel PLUGIN_VERSION= 1.0.4 +PLUGIN_REVISION= 1 PLUGIN_COMMENT= Stunnel TLS proxy PLUGIN_MAINTAINER= ad@opnsense.org PLUGIN_DEPENDS= stunnel diff --git a/security/stunnel/src/etc/inc/plugins.inc.d/stunnel.inc b/security/stunnel/src/etc/inc/plugins.inc.d/stunnel.inc index 374e2ab1a..ad0a37973 100644 --- a/security/stunnel/src/etc/inc/plugins.inc.d/stunnel.inc +++ b/security/stunnel/src/etc/inc/plugins.inc.d/stunnel.inc @@ -70,7 +70,7 @@ function stunnel_refresh_crls() { $stunnel = new OPNsense\Stunnel\Stunnel(); $configObj = OPNsense\Core\Config::getInstance()->object(); - foreach ($stunnel->services->service->__items as $service) { + foreach ($stunnel->services->service->iterateItems() as $service) { if (!empty((string)$service->enabled) && !empty((string)$service->enableCRL)) { foreach (explode(",", (string)$service->cacert) as $cacert) { $this_ca = null; diff --git a/security/stunnel/src/opnsense/mvc/app/controllers/OPNsense/Stunnel/Api/ServicesController.php b/security/stunnel/src/opnsense/mvc/app/controllers/OPNsense/Stunnel/Api/ServicesController.php index edad2be83..0083aec56 100644 --- a/security/stunnel/src/opnsense/mvc/app/controllers/OPNsense/Stunnel/Api/ServicesController.php +++ b/security/stunnel/src/opnsense/mvc/app/controllers/OPNsense/Stunnel/Api/ServicesController.php @@ -39,7 +39,7 @@ class ServicesController extends ApiMutableModelControllerBase { // hook service enable status on enabled tunnels $this->getModel()->general->enabled = "0"; - foreach ($this->getModel()->services->service->__items as $service) { + foreach ($this->getModel()->services->service->iterateItems() as $service) { if ((string)$service->enabled == "1") { $this->getModel()->general->enabled = "1"; break; diff --git a/security/stunnel/src/opnsense/scripts/stunnel/generate_certs.php b/security/stunnel/src/opnsense/scripts/stunnel/generate_certs.php index b1166611e..908e7dd70 100755 --- a/security/stunnel/src/opnsense/scripts/stunnel/generate_certs.php +++ b/security/stunnel/src/opnsense/scripts/stunnel/generate_certs.php @@ -37,7 +37,7 @@ $base_path = "/usr/local/etc/stunnel/certs"; $stunnel = new Stunnel(); $configObj = Config::getInstance()->object(); $all_certs = []; -foreach ($stunnel->services->service->__items as $service) { +foreach ($stunnel->services->service->iterateItems() as $service) { if (!empty((string)$service->enabled)) { $this_uuid = $service->getAttributes()['uuid']; $srv_certid = (string)$service->servercert;