Project

General

Profile

Actions

Bug #16946

open

Mixed DNS and HTTP validation methods clear environment variables during multi-domain certificate issue

Added by Konrad Lanz 2 days ago. Updated 1 day ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
ACME
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Affected Version:
All
Affected Plus Version:
Affected Architecture:
All

Description

When creating a certificate containing multiple SANs that use mixed validation methods (e.g., Domain 1 uses DNS-deSEC, Domain 2 uses Standalone HTTP), the environment variables are cleared.

In `/usr/local/pkg/acme/acme.inc`, `$envvariables = array();` is defined inside the `foreach ($certificate['a_domainlist']['item'] as $domain)` loop. As a result, subsequent loop items (like an HTTP validation row that doesn't supply DNS keys) clear out the environmental array variables collected from previous rows before executing `signCertificate()`.

Moving `$envvariables = array();` immediately above the `foreach` loop fixes the issue, allowing environment definitions to accumulate properly across all target domains in a single execution pass.

Actions #2

Updated by Konrad Lanz 1 day ago

Konrad Lanz wrote in #note-2:
> awk -v bang="!" 'NR==3687 {$0="\t\t\t\t\t\tif (" bang "isset($envvariables)) { $envvariables = array(); }"} {print}' /usr/local/pkg/acme/acme.inc > /usr/local/pkg/acme/acme.inc.tmp && mv /usr/local/pkg/acme/acme.inc.tmp /usr/local/pkg/acme/acme.inc
> 
> sed -n '3685,3690p' /usr/local/pkg/acme/acme.inc
> 
> diff /usr/local/pkg/acme/acme.inc /usr/local/pkg/acme/acme.inc.bak                                                    3687c3687
> <                                               if (!isset($envvariables)) { $envvariables = array(); }
> ---
> >                                       $envvariables = array();
Actions #4

Updated by Jim Pingle 1 day ago

  • Priority changed from Urgent to Normal
Actions

Also available in: Atom PDF