Package org.ejbca.core.ejb.ca.store

Examples of org.ejbca.core.ejb.ca.store.CRLData


    }
    int maxnumber = 0;
    try {
      maxnumber = getLastCRLNumber(admin, issuerdn, deltaCRL);
      X509CRL crl = null;
      CRLData data = CRLData.findByIssuerDNAndCRLNumber(getEntityManager(), issuerdn, maxnumber);
      if (data != null) {
        crl = data.getCRL();
      }
      if (crl != null) {
        String msg = intres.getLocalizedMessage("store.getcrl", issuerdn, Integer.valueOf(maxnumber));             
        log(admin, crl.getIssuerDN().toString().hashCode(), LogConstants.MODULE_CA, new java.util.Date(), null, null, LogConstants.EVENT_INFO_GETLASTCRL, msg);
        return crl.getEncoded();
View Full Code Here


    }
    int crlnumber = 0;
    try {
      crlnumber = getLastCRLNumber(admin, issuerdn, deltaCRL);
      CRLInfo crlinfo = null;
      CRLData data = CRLData.findByIssuerDNAndCRLNumber(getEntityManager(), issuerdn, crlnumber);
      if (data != null) {
        crlinfo = new CRLInfo(data.getIssuerDN(), crlnumber, data.getThisUpdate(), data.getNextUpdate());
      } else {
        if (deltaCRL && (crlnumber == 0)) {
          if (log.isDebugEnabled()) {
            log.debug("No delta CRL exists for CA with dn '"+issuerdn+"'");
          }
View Full Code Here

    if (log.isTraceEnabled()) {
      log.trace(">getCRLInfo(" + fingerprint+")");
    }
    try {
      CRLInfo crlinfo = null;
      CRLData data = CRLData.findByFingerprint(getEntityManager(), fingerprint);
      if (data != null) {
        crlinfo = new CRLInfo(data.getIssuerDN(), data.getCrlNumber(), data.getThisUpdate(), data.getNextUpdate());
      } else {
        if (log.isDebugEnabled()) {
          log.debug("No CRL exists with fingerprint '"+fingerprint+"'");
        }
        String msg = intres.getLocalizedMessage("store.errorgetcrl", fingerprint, new Integer(0));             
View Full Code Here

      if (number <= lastNo) {
        // There is already a CRL with this number, or a later one stored. Don't create duplicates
        String msg = intres.getLocalizedMessage("store.storecrlwrongnumber", new Integer(number), new Integer(lastNo));             
        this.logSession.log(admin, LogConstants.INTERNALCAID, LogConstants.MODULE_CA, new java.util.Date(), null, null, LogConstants.EVENT_ERROR_STORECRL, msg);           
      }
      this.entityManager.persist(new CRLData(incrl, number, issuerDN, thisUpdate, nextUpdate, cafp, deltaCRLIndicator));
      String msg = intres.getLocalizedMessage("store.storecrl", Integer.valueOf(number), null);             
      this.logSession.log(admin, issuerDN.toString().hashCode(), LogConstants.MODULE_CA, new java.util.Date(), null, null, LogConstants.EVENT_INFO_STORECRL, msg);
    } catch (Exception e) {
      String msg = intres.getLocalizedMessage("store.storecrl");             
      this.logSession.log(admin, LogConstants.INTERNALCAID, LogConstants.MODULE_CA, new java.util.Date(), null, null, LogConstants.EVENT_ERROR_STORECRL, msg);
View Full Code Here

  // ZZ to run this test last, since we often run out of memory here and mess up the database connection.
  public void testZZCRLData() {
    LOG.trace(">testCRLData");
    logMemStats();
    String CLOB_100MiB = getClob(100*1024*1024);
    CRLData entity = new CRLData();
    entity.setBase64Crl(CLOB_100MiB);
    CLOB_100MiB = null;
    System.gc();
    entity.setCaFingerprint(VARCHAR_250B);
    entity.setCrlNumber(0);
    entity.setDeltaCRLIndicator(0);
    entity.setFingerprint(VARCHAR_250B);
    entity.setIssuerDN(VARCHAR_250B);
    //setPrivateField(entity, "issuerDN", VARCHAR_250B);
    entity.setNextUpdate(0L);
    entity.setRowProtection(CLOB_10KiB);
    entity.setRowVersion(0);
    entity.setThisUpdate(0L);
    storeAndRemoveEntity(entity);
    LOG.trace("<testCRLData");
  }
View Full Code Here

                } else if (publishType == PublisherConst.PUBLISH_TYPE_CRL) {

                    if (log.isDebugEnabled()) {
                        log.debug("Publishing CRL");
                    }
                    CRLData crlData = CRLData.findByFingerprint(entityManager, fingerprint);

                    if (crlData == null) {
                        throw new FinderException();
                    }
                    published = publisherQueueSession.storeCRLNonTransactional(publisher, admin, crlData.getCRLBytes(), crlData.getCaFingerprint(), crlData.getCrlNumber(), userDataDN);
                } else {
                    String msg = intres.getLocalizedMessage("publisher.unknowntype", publishType);
                    log.error(msg);
                }
            } catch (FinderException e) {
View Full Code Here

TOP

Related Classes of org.ejbca.core.ejb.ca.store.CRLData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.