String caname = "" + caid;
CAData signedbydata = CAData.findByIdOrThrow(entityManager, Integer.valueOf(caid));
try {
caname = signedbydata.getName();
CA signedbyCA = signedbydata.getCA();
returnval = signedbyCA.signRequest(request, usepreviouskey, createlinkcert);
String msg = intres.getLocalizedMessage("caadmin.certreqsigned", caname);
logSession.log(admin, caid, LogConstants.MODULE_CA, new java.util.Date(), null, null, LogConstants.EVENT_INFO_SIGNEDREQUEST, msg);
} catch (Exception e) {
String msg = intres.getLocalizedMessage("caadmin.errorcertreqsign", caname);
logSession.log(admin, caid, LogConstants.MODULE_CA, new java.util.Date(), null, null, LogConstants.EVENT_ERROR_SIGNEDREQUEST, msg, e);