'That certificate no longer exists.']); exit; } $client_id = intval($certificate['certificate_client_id']); enforceClientAccess(); // When it was last looked at - kept off the updated date mysqli_query($mysqli, "UPDATE certificates SET certificate_accessed_at = NOW(), certificate_updated_at = certificate_updated_at WHERE certificate_id = $certificate_id"); $certificate_name = escapeHtml($certificate['certificate_name']); $certificate_archived = !empty($certificate['certificate_archived_at']); $can_edit = certificateCan(2) && !$certificate_archived; $host = certificateHost($certificate['certificate_domain']); $expiry = certificateExpiry($certificate); $parsed = certificateParse($certificate['certificate_public_key']); $names = certificateNames($certificate); $services = servicesFor('certificate', $certificate_id); $history = certificateHistory($certificate_id, 15); $pem = $parsed ? $parsed['pem'] : ''; $fingerprint = trim((string) $certificate['certificate_fingerprint']); // What the last check found, said in full when it is a problem - with what to do about it $status_problem = null; $status = (string) $certificate['certificate_check_status']; if ($status !== 'ok' && isset(CERTIFICATE_CHECK_STATES[$status])) { $status_problem = CERTIFICATE_CHECK_STATES[$status]; $status_problem['hint'] = [ 'mismatch' => 'install the certificate for this name, or check the host is right', 'untrusted' => !$parsed ? 'replace a self-signed certificate with one from a CA (or your own CA, for internal hosts), or install the intermediate certificates with it' : ($parsed['self_signed'] ? 'replace the self-signed certificate with one from a CA (or your own CA, for internal hosts)' : 'install the intermediate certificates with it'), 'expired' => 'renew it, and install the new one', 'unreachable' => 'check the host and port, or that ITFlow can reach it', ][$status] ?? ''; } // Covered names - the host's own first, then the rest as the certificate lists them if ($host && $names) { usort($names, function ($a, $b) use ($host) { return intval(certificateCovers($host['host'], [$b])) - intval(certificateCovers($host['host'], [$a])); }); } ob_start(); ?>
No service is linked to it.