misc_dir variable into root.xml
configuration.");
return "admin/home";
}
$misc_dir = $VAR['misc_dir'];
if (!is_dir("$misc_dir/shared") || !is_writable("$misc_dir/shared"))
{
erreur("$misc_dir/shared/
directory not writable.");
return "admin/home";
}
$template->assign("cert_writable", is_writable("$misc_dir/shared/") && is_writable("$misc_dir/PKI/"));
$ca_file = "$misc_dir/shared/cacert.crt";
if (file_exists($ca_file))
{
if (!is_readable($ca_file))
erreur("Impossible de lire le fichier");
else
$template->assign("cert_CA",
openssl_x509_parse(file_get_contents($ca_file)));
}
$srv_file = "$misc_dir/shared/server.crt";
if (file_exists($srv_file))
{
if (!is_readable($srv_file))
erreur("Impossible de lire le fichier");
else
$template->assign("cert_srv",
openssl_x509_parse(file_get_contents($srv_file)));
}
return "admin/home";