Add a textarea to show the output of the CA.sh

This commit is contained in:
Li Chen 2013-11-25 19:36:28 +01:00
commit 7cf991d537
4 changed files with 24 additions and 6 deletions

View file

@ -28,6 +28,7 @@ function new_client($name, $misc_dir)
putenv("OPENSSL_CONF=$misc_dir/openssl.cnf");
putenv("TOP_DIR=$misc_dir/pki");
$output = shell_exec("$misc_dir/CA.sh -newclient $name");
return $output;
}
if (!empty($p[2]))

View file

@ -31,6 +31,7 @@ if (!empty($_FILES["inputFile"]['tmp_name']))
$elements = $xpath->query("//teams/team");
if (!is_null($elements))
{
$output = "";
foreach ($elements as $element)
{
$team = new Team();
@ -72,9 +73,10 @@ if (!empty($_FILES["inputFile"]['tmp_name']))
if (!empty($team->team_name))
{
//TODO save the certificate subject
new_client($team->team_name, $misc_dir);
$output .= new_client($team->team_name, $misc_dir);
}
}
$template->assign("output", $output);
}
erreur("Fichier XML importé avec succès.", "success");
}