log.debug("Keylength = " + keyLength);
}
if (keyLength == -1) {
String text = intres.getLocalizedMessage("signsession.unsupportedkeytype", pk.getClass().getName());
logSession.log(admin, caid, LogConstants.MODULE_CA, new Date(), username, null, LogConstants.EVENT_INFO_CREATECERTIFICATE, text);
throw new IllegalKeyException(text);
}
if ((keyLength < (certProfile.getMinimumAvailableBitLength() - 1))
|| (keyLength > (certProfile.getMaximumAvailableBitLength()))) {
String text = intres.getLocalizedMessage("signsession.illegalkeylength", Integer.valueOf(keyLength));
logSession.log(admin, caid, LogConstants.MODULE_CA, new Date(), username, null, LogConstants.EVENT_INFO_CREATECERTIFICATE, text);
throw new IllegalKeyException(text);
}
// Below we have a small loop if it would happen that we generate the same serial number twice
Exception storeEx = null; // this will not be null if stored == false after the below passage
Certificate cert = null;