log.debug("CA "+caname+" expires on "+expire);
if (expire.before(new Date(expiretime))) {
try {
// Only try to renew active CAs
// There should be other monitoring available to check if CAs that should not be off-line are off-line (HealthCheck)
CATokenInfo tokeninfo = info.getCATokenInfo();
log.debug("CA status is "+info.getStatus()+", CA token status is "+tokeninfo.getCATokenStatus());
if ( (info.getStatus() == SecConst.CA_ACTIVE) && (tokeninfo.getCATokenStatus() == ICAToken.STATUS_ACTIVE) ) {
caAdminSession.renewCA(getAdmin(), info.getCAId(), null, isRenewKeys());
} else {
log.debug("Not trying to renew CA because CA and token status are not on-line.");
}
} catch (CADoesntExistsException e) {