Skip to content

Commit 8127d07

Browse files
committed
Add comment to why --cert-name is added to 0.30 check
1 parent a7f17fc commit 8127d07

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/lib/classes/letsencrypt.inc.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,15 @@ public function get_certbot_command($domains) {
152152
$acme_version = 'https://acme-v01.api.letsencrypt.org/directory';
153153
}
154154
if (version_compare($letsencrypt_version, '0.30', '>=')) {
155-
$app->log("LE version is " . $letsencrypt_version . ", so using certificates command", LOGLEVEL_DEBUG);
155+
$app->log("LE version is " . $letsencrypt_version . ", so using certificates command and --cert-name instead of --expand", LOGLEVEL_DEBUG);
156156
$this->certbot_use_certcommand = true;
157157
$webroot_map = array();
158158
for($i = 0; $i < count($domains); $i++) {
159159
$webroot_map[$domains[$i]] = '/usr/local/ispconfig/interface/acme';
160160
}
161161
$webroot_args = "--webroot-map " . escapeshellarg(str_replace(array("\r", "\n"), '', json_encode($webroot_map)));
162+
// --cert-name might be working with earlier versions of certbot, but there is no safe version since when
163+
// Sot for safety reasons we add it to the 0.30 version check as it is documented to work as expected in this version
162164
$cert_selection_command = "--cert-name $primary_domain";
163165
} else {
164166
$webroot_args = "$cmd --webroot-path /usr/local/ispconfig/interface/acme";

0 commit comments

Comments
 (0)