security/acme-client: merge version 1.17 from master

This commit is contained in:
Franco Fichtner 2018-08-16 11:37:51 +02:00
parent e0a2e9bd72
commit 131a20edcf
2 changed files with 6 additions and 2 deletions

View file

@ -1,5 +1,5 @@
PLUGIN_NAME= acme-client
PLUGIN_VERSION= 1.16
PLUGIN_VERSION= 1.17
PLUGIN_COMMENT= Let's Encrypt client
PLUGIN_MAINTAINER= opnsense@moov.de
PLUGIN_DEPENDS= acme.sh bind912

View file

@ -319,10 +319,14 @@ function run_acme_account_registration($acctObj, $certObj, $modelObj)
$account_conf_dir = "/var/etc/acme-client/accounts/" . $acctObj->id;
$account_conf_file = $account_conf_dir . "/account.conf";
$account_key_file = $account_conf_dir . "/account.key";
$account_json_file = $account_conf_dir . "/account.json";
$account_ca_file = $account_conf_dir . "/ca.conf";
$acme_conf = array();
$acme_conf[] = "CERT_HOME='/var/etc/acme-client/home'";
$acme_conf[] = "LOG_FILE='/var/log/acme.sh.log'";
$acme_conf[] = "ACCOUNT_KEY_PATH='" . $account_key_file . "'";
$acme_conf[] = "ACCOUNT_JSON_PATH='" . $account_json_file . "'";
$acme_conf[] = "CA_CONF='" . $account_ca_file . "'";
if (!empty((string)$acctObj->email)) {
$acme_conf[] = "ACCOUNT_EMAIL='" . (string)$acctObj->email . "'";
}
@ -810,7 +814,7 @@ function run_acme_validation($certObj, $valObj, $acctObj)
}
// if OCSP Extension is turned on pass --ocsp parameter to acme client
if (isset($certObj->ocsp)) {
if (isset($certObj->ocsp) and ($certObj->ocsp == 1)) {
$acme_args[] = "--ocsp";
}