From 078257cdb3daff37bdad9b94cd26c9914640aaf3 Mon Sep 17 00:00:00 2001 From: Frank Wall Date: Sun, 22 Nov 2020 00:03:40 +0100 Subject: [PATCH] security/acme-client: fix creation of nsupdate secrets file --- security/acme-client/pkg-descr | 5 +++++ .../library/OPNsense/AcmeClient/LeValidation/DnsNsupdate.php | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/security/acme-client/pkg-descr b/security/acme-client/pkg-descr index 9e90b9e38..788a21e8a 100644 --- a/security/acme-client/pkg-descr +++ b/security/acme-client/pkg-descr @@ -8,6 +8,11 @@ WWW: https://github.com/acmesh-official/acme.sh Plugin Changelog ================ +2.1 + +Fixed: +* fix creation of nsupdate secrets file + 2.0 Added: diff --git a/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/DnsNsupdate.php b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/DnsNsupdate.php index 5fe117e5e..4d6f349d5 100644 --- a/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/DnsNsupdate.php +++ b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/DnsNsupdate.php @@ -39,9 +39,9 @@ class DnsNsupdate extends Base implements LeValidationInterface { public function prepare() { - $configdir = (string)sprintf(self::ACME_CONFIG_DIR, $this->cert_uuid); + $configdir = (string)sprintf(self::ACME_CONFIG_DIR, $this->cert_id); $secret_key_filename = "${configdir}/secret.key"; - $secret_key_data = (string)$this->config->dns_nsupdate_key . '\n'; + $secret_key_data = (string)$this->config->dns_nsupdate_key . "\n"; file_put_contents($secret_key_filename, $secret_key_data); // Add env variables