From 00d5323b2351369f5afb08f2b1b740093e0dc262 Mon Sep 17 00:00:00 2001 From: Adrian Fedoreanu Date: Sat, 1 Aug 2020 13:43:34 +0200 Subject: [PATCH] acme-client add support for 1984Hosting API --- security/acme-client/Makefile | 2 +- security/acme-client/pkg-descr | 2 +- .../AcmeClient/forms/dialogValidation.xml | 15 +++++++++++++++ .../app/models/OPNsense/AcmeClient/AcmeClient.xml | 9 ++++++++- .../scripts/OPNsense/AcmeClient/certhelper.php | 4 ++++ 5 files changed, 29 insertions(+), 3 deletions(-) diff --git a/security/acme-client/Makefile b/security/acme-client/Makefile index 7e359a146..de178737e 100644 --- a/security/acme-client/Makefile +++ b/security/acme-client/Makefile @@ -1,5 +1,5 @@ PLUGIN_NAME= acme-client -PLUGIN_VERSION= 1.34 +PLUGIN_VERSION= 1.35 PLUGIN_COMMENT= Let's Encrypt client PLUGIN_MAINTAINER= opnsense@moov.de PLUGIN_DEPENDS= acme.sh py${PLUGIN_PYTHON}-dns-lexicon diff --git a/security/acme-client/pkg-descr b/security/acme-client/pkg-descr index 78dc22cf2..666ea3bb6 100644 --- a/security/acme-client/pkg-descr +++ b/security/acme-client/pkg-descr @@ -1,5 +1,5 @@ This plugin contains a full ACME protocol implementation based on the -acme.sh project. Acording to the authors, it's probably "the easiest +acme.sh project. According to the authors, it's probably "the easiest and smallest and smartest shell script" to automatically issue and renew the free certificates from Let's Encrypt. diff --git a/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogValidation.xml b/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogValidation.xml index 8ad18f5a3..bad287940 100644 --- a/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogValidation.xml +++ b/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogValidation.xml @@ -1121,4 +1121,19 @@ password + + + header + + + + validation.dns_1984hosting_user + + text + + + validation.dns_1984hosting_password + + password + diff --git a/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/AcmeClient.xml b/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/AcmeClient.xml index 2880e1161..dd9853ec1 100644 --- a/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/AcmeClient.xml +++ b/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/AcmeClient.xml @@ -1,6 +1,6 @@ //OPNsense/AcmeClient - 1.6.1 + 1.6.2 A secure Let's Encrypt plugin @@ -357,6 +357,7 @@ Y dns_nsupdate + 1984Hosting API ACME DNS API Acmeproxy API Alwaysdata.com API @@ -893,6 +894,12 @@ N + + N + + + N + diff --git a/security/acme-client/src/opnsense/scripts/OPNsense/AcmeClient/certhelper.php b/security/acme-client/src/opnsense/scripts/OPNsense/AcmeClient/certhelper.php index 7c7a6109c..1d9e29f0e 100755 --- a/security/acme-client/src/opnsense/scripts/OPNsense/AcmeClient/certhelper.php +++ b/security/acme-client/src/opnsense/scripts/OPNsense/AcmeClient/certhelper.php @@ -647,6 +647,10 @@ function run_acme_validation($certObj, $valObj, $acctObj) // Setup DNS hook: // Set required env variables, write secrets to files, etc. switch ((string)$valObj->dns_service) { + case 'dns_1984hosting': + $proc_env['One984HOSTING_Username'] = (string)$valObj->dns_1984hosting_user; + $proc_env['One984HOSTING_Password'] = (string)$valObj->dns_1984hosting_password; + break; case 'dns_acmedns': $proc_env['ACMEDNS_USERNAME'] = (string)$valObj->dns_acmedns_user; $proc_env['ACMEDNS_PASSWORD'] = (string)$valObj->dns_acmedns_password;