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

@ -4,11 +4,18 @@ if(!defined('ONYX')) exit;
if (!empty($_FILES["inputFile"]['tmp_name']))
{
//TODO use a variable to define the path
if (!file_exists(ONYX . "../misc/fic_pki/cacert.crt"))
{
erreur("The root certificate file not found, please create this first");
return "admin/import_users";
}
$doc = new DOMDocument();
if (@!$doc->load($_FILES["inputFile"]['tmp_name']))
{
erreur("Unable to parse given file. A XML file was expected.");
return;
return "admin/import_users";
}
$xpath = new DOMXpath($doc);