From 72472c37be95fe66cbd3363cd03380522d879a0f Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Tue, 10 Sep 2024 20:35:21 +0200 Subject: [PATCH] System: Trust: Revocation - add missing CRL changed event Although the current impact is likely low, when CRL's are updated, they should trigger this event to update the consumers of this information (as it was pre-migration) --- .../app/controllers/OPNsense/Trust/Api/CrlController.php | 3 +++ src/opnsense/service/conf/actions.d/actions_system.conf | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/src/opnsense/mvc/app/controllers/OPNsense/Trust/Api/CrlController.php b/src/opnsense/mvc/app/controllers/OPNsense/Trust/Api/CrlController.php index d8cebb5fc..3ce5e49bc 100644 --- a/src/opnsense/mvc/app/controllers/OPNsense/Trust/Api/CrlController.php +++ b/src/opnsense/mvc/app/controllers/OPNsense/Trust/Api/CrlController.php @@ -30,6 +30,7 @@ namespace OPNsense\Trust\Api; use OPNsense\Base\ApiControllerBase; use OPNsense\Base\UserException; +use OPNsense\Core\Backend; use OPNsense\Core\Config; use OPNsense\Trust\Store as CertStore; @@ -367,6 +368,7 @@ class CrlController extends ApiControllerBase } } Config::getInstance()->save(); + (new Backend())->configdRun('system trust crl', true); return ['status' => 'saved']; } } @@ -393,6 +395,7 @@ class CrlController extends ApiControllerBase } if (count($to_delete) > 0) { Config::getInstance()->save(); + (new Backend())->configdRun('system trust crl', true); return ['status' => 'deleted']; } else { Config::getInstance()->unlock(); diff --git a/src/opnsense/service/conf/actions.d/actions_system.conf b/src/opnsense/service/conf/actions.d/actions_system.conf index 4b12d51f2..989bb0520 100644 --- a/src/opnsense/service/conf/actions.d/actions_system.conf +++ b/src/opnsense/service/conf/actions.d/actions_system.conf @@ -133,6 +133,12 @@ parameters: type:script message:configure trust +[trust.crl] +command:/usr/local/sbin/pluginctl -c crl +type:script +message: trigger CRL changed event + + [cpu.stream] command:/usr/local/opnsense/scripts/system/cpu.py parameters:--interval %s