pw.close();
} catch(IOException ex) {
throw RB.newGridCAException(ex, "gridCAImpl.error.io",ex.getLocalizedMessage());
}
Expect pb = createProcess();
if(type.equals("user")) {
pb.command().add("-pkcs12");
} else if (type.equals("sdm_daemon")) {
pb.command().add("-sdm_pkcs12");
} else if (type.equals("sge_daemon")) {
pb.command().add("-sys_pkcs12");
}
pb.command().add(username);
pb.command().add("-pkcs12pwf");
pb.command().add(passwordFile.getAbsolutePath());
pb.command().add("-pkcs12dir");
pb.command().add(config.getTmpDir().getAbsolutePath());
execute(pb);
} finally {
if(userFile != null) {