Fixed client certificate generation
This commit is contained in:
parent
30802be380
commit
e3f51487ab
2 changed files with 2 additions and 10 deletions
|
@ -22,16 +22,8 @@ function remove_directory($dir)
|
|||
}
|
||||
}
|
||||
|
||||
function new_client($name)
|
||||
function new_client($name, $misc_dir)
|
||||
{
|
||||
if (isset($VAR['misc_dir']))
|
||||
$misc_dir = $VAR['misc_dir'];
|
||||
else
|
||||
{
|
||||
erreur("Merci d'ajouter la variable misc_dir dans root.xml");
|
||||
return "admin/home";
|
||||
}
|
||||
|
||||
//TODO handle if already exist
|
||||
putenv("OPENSSL_CONF=$misc_dir/openssl.cnf");
|
||||
putenv("TOP_DIR=$misc_dir/pki");
|
||||
|
|
|
@ -72,7 +72,7 @@ if (!empty($_FILES["inputFile"]['tmp_name']))
|
|||
if (!empty($team->team_name))
|
||||
{
|
||||
//TODO save the certificate subject
|
||||
new_client($team->team_name);
|
||||
new_client($team->team_name, $misc_dir);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue