// Check that administrator has superadminstrator rights.
if(!authorizationSession.isAuthorizedNoLog(admin, "/super_administrator")) {
String msg = intres.getLocalizedMessage("caadmin.notauthorizedtocreateca", "create", cainfo.getName());
logSession.log(admin, admin.getCaId(), LogConstants.MODULE_CA, new java.util.Date(), null, null, LogConstants.EVENT_ERROR_NOTAUTHORIZEDTORESOURCE,
msg);
throw new AuthorizationDeniedException(msg);
}
// Check that CA doesn't already exists
int caid = cainfo.getCAId();
if (caid >= 0 && caid <= CAInfo.SPECIALCAIDBORDER) {
String msg = intres.getLocalizedMessage("caadmin.wrongcaid", Integer.valueOf(caid));