Fixed client certificate generation

This commit is contained in:
Li Chen 2013-11-25 19:18:51 +01:00
parent 30802be380
commit e3f51487ab
2 changed files with 2 additions and 10 deletions

View file

@ -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 //TODO handle if already exist
putenv("OPENSSL_CONF=$misc_dir/openssl.cnf"); putenv("OPENSSL_CONF=$misc_dir/openssl.cnf");
putenv("TOP_DIR=$misc_dir/pki"); putenv("TOP_DIR=$misc_dir/pki");

View file

@ -72,7 +72,7 @@ if (!empty($_FILES["inputFile"]['tmp_name']))
if (!empty($team->team_name)) if (!empty($team->team_name))
{ {
//TODO save the certificate subject //TODO save the certificate subject
new_client($team->team_name); new_client($team->team_name, $misc_dir);
} }
} }
} }