getLogSession().log(admin, certificate, LogEntry.MODULE_CA, new java.util.Date(), null, certificate, LogEntry.EVENT_INFO_REVOKEDCERT,("Reason :" + reason));
getLogSession().log(admin, certificate, LogEntry.MODULE_CA, new java.util.Date(), null, certificate, LogEntry.EVENT_INFO_REVOKEDCERT,("Reason :" + reason));  if(publishers!= null){ getPublisherSession().revokeCertificate(admin, publishers, certificate, reason); }
    public void setRevokeStatus(Admin admin, String username, int reason) {       X509Certificate certificate = null;       // Strip dangerous chars       username = StringTools.strip(username);       try{         Collection certs = findCertificatesByUsername(admin, username);          // Revoke all certs         if (!certs.isEmpty()) {           Iterator j = certs.iterator();           while (j.hasNext()) {             CertificateDataPK revpk = new CertificateDataPK();             certificate = (X509Certificate) j.next();             revpk.fingerprint = CertTools.getFingerprintAsString(certificate);             CertificateDataLocal rev = certHome.findByPrimaryKey(revpk);             if (rev.getStatus() != CertificateData.CERT_REVOKED) {              rev.setStatus(CertificateData.CERT_REVOKED);              rev.setRevocationDate(new Date());              rev.setRevocationReason(reason);                           getLogSession().log(admin, certificate, LogEntry.MODULE_CA, new java.util.Date(), null, certificate, LogEntry.EVENT_INFO_REVOKEDCERT,("Reason :" + reason));                          }          }         }       }catch(FinderException e){          getLogSession().log(admin, admin.getCAId(),  LogEntry.MODULE_CA, new java.util.Date(), null, null, LogEntry.EVENT_ERROR_REVOKEDCERT,("Couldn't find certificate with username :" + username));          throw new EJBException(e);       }    } // setRevokeStatus