Merge pull request #2715 from fraenki/acme_370

security/acme-client: release 3.7
This commit is contained in:
Frank Wall 2021-12-22 09:47:14 +01:00 committed by GitHub
commit cda60f4f96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 12 deletions

View file

@ -1,5 +1,5 @@
PLUGIN_NAME= acme-client
PLUGIN_VERSION= 3.6
PLUGIN_VERSION= 3.7
PLUGIN_COMMENT= ACME Client
PLUGIN_MAINTAINER= opnsense@moov.de
PLUGIN_DEPENDS= acme.sh py${PLUGIN_PYTHON}-dns-lexicon

View file

@ -8,6 +8,13 @@ WWW: https://github.com/acmesh-official/acme.sh
Plugin Changelog
================
3.7
Fixed:
* fix SFTP buttons not visible (#2712)
* fix invalid default value when no WAN interface can be found (#2712)
* fix incompatibility with new gcloud SDK (#2710)
3.6
Added:

View file

@ -1,7 +1,7 @@
<?php
/*
* Copyright (C) 2020 Frank Wall
* Copyright (C) 2020-2021 Frank Wall
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -64,7 +64,8 @@ class DnsGcloud extends Base implements LeValidationInterface
}
// Preparations to run gcloud CLI.
$val_id = (string)$this->config->id;
// NOTE: Never versions of gcloud SDK no longer allow dots in config names.
$val_id = str_replace('.', '-', (string)$this->config->id);
$gcloud_config = "acme-${val_id}";
$gcloud_key_file = '/tmp/acme_' . (string)$this->config->dns_service . "_${val_id}.json";
file_put_contents($gcloud_key_file, (string)$this->config->dns_gcloud_key);
@ -74,11 +75,11 @@ class DnsGcloud extends Base implements LeValidationInterface
$proc_env['CLOUDSDK_CORE_PROJECT'] = $gcloud_project;
// Ensure that a working gcloud config exists.
LeUtils::run_shell_command("/usr/local/bin/gcloud config configurations create ${gcloud_config}", $proc_env);
LeUtils::run_shell_command("/usr/local/bin/gcloud config configurations activate ${gcloud_config}", $proc_env);
LeUtils::run_shell_command("/usr/local/bin/gcloud auth activate-service-account --key-file=${gcloud_key_file}", $proc_env);
LeUtils::run_shell_command("/usr/local/bin/gcloud config set account ${gcloud_account}", $proc_env);
LeUtils::run_shell_command("/usr/local/bin/gcloud config set project ${gcloud_project}", $proc_env);
LeUtils::run_shell_command("/usr/local/bin/gcloud --quiet config configurations create ${gcloud_config}", $proc_env);
LeUtils::run_shell_command("/usr/local/bin/gcloud --quiet config configurations activate ${gcloud_config}", $proc_env);
LeUtils::run_shell_command("/usr/local/bin/gcloud --quiet auth activate-service-account --key-file=${gcloud_key_file}", $proc_env);
LeUtils::run_shell_command("/usr/local/bin/gcloud --quiet config set account ${gcloud_account}", $proc_env);
LeUtils::run_shell_command("/usr/local/bin/gcloud --quiet config set project ${gcloud_project}", $proc_env);
// Save config for acme client.
$this->acme_env['CLOUDSDK_PYTHON'] = '/usr/local/bin/python3';

View file

@ -362,7 +362,6 @@
</http_opn_autodiscovery>
<http_opn_interface type="InterfaceField">
<Required>N</Required>
<default>wan</default>
<filters>
<enable>/^(?!0).*$/</enable>
</filters>
@ -404,7 +403,6 @@
</tlsalpn_acme_autodiscovery>
<tlsalpn_acme_interface type="InterfaceField">
<Required>N</Required>
<default>wan</default>
<filters>
<enable>/^(?!0).*$/</enable>
</filters>

View file

@ -96,7 +96,7 @@ POSSIBILITY OF SUCH DAMAGE.
(function ($identityType) {
var identityDiv = makeStatusDiv($identityType);
makeButton("{{ lang._('Show Identity') }}", "upload_sftp", "btn-info")
makeButton("{{ lang._('Show Identity') }}", "configd_upload_sftp", "btn-info")
.click(function () {
identityDiv.hide();
var button = $(this);
@ -145,7 +145,7 @@ POSSIBILITY OF SUCH DAMAGE.
{msg: "{{ lang._('Test failed, see details.') }}"},
];
makeButton("{{ lang._('Test Connection') }}", "upload_sftp")
makeButton("{{ lang._('Test Connection') }}", "configd_upload_sftp")
.click(function () {
statusDiv.hide();
var button = $(this);