Certificates report
There are no certificates to display.
Setup is complete. This page isn't needed for SSL manager to work.
Submit security token to finalize setup
/dev/null' : ' 2>&1'); debug_log('Running command: ' . $cmd); return shell_exec(escapeshellcmd($cmd)); } /** * Run the manager info command. */ function getManagerInfo($path) { debug_log("Fetching manager info."); $infoOutput = managerInstalled($path) ? managerExec($path, 'info', true) : "Manager is not installed"; debug_log("Manager info: " . $infoOutput); return $infoOutput; } /** * Check if the manager is registered. * We assume that if the output contains "Manager is ready" * then registration is complete. */ function isAlreadyRegistered($infoOutput) { return isset($infoOutput) && strpos($infoOutput, "Manager is ready") !== false; } /** * Execute the registration command using the provided token. */ function register_manager($path, $token) { $escapedToken = escapeshellarg($token); $escapedUrl = escapeshellarg(API_BASE_URL . '/'); return managerExec($path, "register -t $escapedToken -u $escapedUrl", false); } /** * Run the manager report command and parse JSON output. * Supports output as a single JSON array or newline-delimited JSON. */ function getManagerReport($path) { if (!managerInstalled($path)) { return false; } $rawReport = managerExec($path, 'report', true); $rawReport = trim($rawReport); if (empty($rawReport)) { return []; } // If the report starts with a '[' then assume it's a JSON array. if (strpos($rawReport, '[') === 0) { $decoded = json_decode($rawReport, true); return is_array($decoded) ? $decoded : []; } else { $lines = explode("\n", $rawReport); $reportItems = []; foreach ($lines as $line) { $line = trim($line); if ($line !== '') { $decoded = json_decode($line, true); if ($decoded) { // If this line decodes to an array of items, add them individually. if (is_array($decoded) && isset($decoded[0])) { foreach ($decoded as $entry) { $reportItems[] = $entry; } } else { $reportItems[] = $decoded; } } } } return $reportItems; } } // ---------- If "report" is requested, show Report Page ---------- if (isset($_GET['report'])) { debug_log("Report requested"); $rawReports = getManagerReport($managerPath); debug_log("Raw report data: " . print_r($rawReports, true)); // Group distinct certificates based on panelCertificateInfo ID. $distinct = []; if ($rawReports) { foreach ($rawReports as $item) { $id = coalesce($item['panelCertificateInfo']['id'], ''); if ($id && !isset($distinct[$id])) { $distinct[$id] = $item; } } } debug_log("Distinct report entries: " . print_r($distinct, true)); ?>
There are no certificates to display.
Setup is complete. This page isn't needed for SSL manager to work.
Submit security token to finalize setup