Commit 0b1bfdba authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(captive portal) add missing ca chain content

(cherry picked from commit cb856c71)
parent dbb47027
...@@ -57,8 +57,9 @@ if (isset($configObj->OPNsense->captiveportal->zones)) { ...@@ -57,8 +57,9 @@ if (isset($configObj->OPNsense->captiveportal->zones)) {
// generate ca pem file // generate ca pem file
if (!empty($cert->caref)) { if (!empty($cert->caref)) {
$output_pem_filename = "/var/etc/ca-cp-zone" . $zone_id . ".pem" ; $output_pem_filename = "/var/etc/ca-cp-zone" . $zone_id . ".pem" ;
$cert = (array)$cert;
$ca = ca_chain($cert); $ca = ca_chain($cert);
file_put_contents($output_pem_filename, $pem_content); file_put_contents($output_pem_filename, $ca);
chmod($output_pem_filename, 0600); chmod($output_pem_filename, 0600);
echo "certificate generated " .$output_pem_filename ."\n"; echo "certificate generated " .$output_pem_filename ."\n";
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment