Possibility to generate and delete the root CA in the admin panel

This commit is contained in:
Li Chen 2013-11-12 20:24:34 +01:00
parent 38f1886972
commit c5c54f3b1a
5 changed files with 111 additions and 7 deletions

View file

@ -2,4 +2,16 @@
if(!defined('ONYX')) exit;
return "admin/home";
//TODO handle the path ?
$ca_file = ONYX . '../misc/fic_pki/cacert.crt';
//TODO check permission ?
if (!file_exists($ca_file))
erreur("Can not to find the root certificate");
else
{
$data = openssl_x509_parse(file_get_contents(ONYX . '../misc/fic_pki/cacert.crt'));
$template->assign("cert", $data);
}
return "admin/home";