Class CRLRepository

  • All Implemented Interfaces:
    com.netscape.certsrv.dbs.crldb.ICRLRepository, com.netscape.certsrv.dbs.repository.IRepository

    public class CRLRepository
    extends Repository
    implements com.netscape.certsrv.dbs.crldb.ICRLRepository
    A class represents a CRL repository. It stores all the CRL issuing points.

    Version:
    $Revision$, $Date$
    Author:
    thomask
    • Constructor Summary

      Constructors 
      Constructor Description
      CRLRepository​(DBSubsystem dbSubsystem, int increment, java.lang.String baseDN)
      Constructs a CRL repository.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addCRLIssuingPointRecord​(com.netscape.certsrv.dbs.crldb.ICRLIssuingPointRecord rec)
      Adds CRL issuing points.
      void deleteCRLIssuingPointRecord​(java.lang.String id)
      deletes issuing point record.
      DBSubsystem getDBSubsystem()
      Retrieves backend database handle.
      java.lang.String getDN()
      Retrieves DN of this repository.
      java.util.Vector<java.lang.String> getIssuingPointsNames()
      Retrieves all issuing points' names
      java.math.BigInteger getLastSerialNumberInRange​(java.math.BigInteger serial_low_bound, java.math.BigInteger serial_upper_bound)  
      void modifyCRLIssuingPointRecord​(java.lang.String id, com.netscape.certsrv.dbs.ModificationSet mods)
      Modifies issuing point record.
      com.netscape.certsrv.dbs.crldb.ICRLIssuingPointRecord readCRLIssuingPointRecord​(java.lang.String id)
      Reads issuing point record.
      void removeAllObjects()
      Removes all objects with this repository.
      void updateCRLCache​(java.lang.String id, java.lang.Long crlSize, java.util.Hashtable<java.math.BigInteger,​org.mozilla.jss.netscape.security.x509.RevokedCertificate> revokedCerts, java.util.Hashtable<java.math.BigInteger,​org.mozilla.jss.netscape.security.x509.RevokedCertificate> unrevokedCerts, java.util.Hashtable<java.math.BigInteger,​org.mozilla.jss.netscape.security.x509.RevokedCertificate> expiredCerts)
      Updates CRL issuing point record with CRL cache info.
      void updateCRLIssuingPointRecord​(java.lang.String id, byte[] newCRL, java.util.Date thisUpdate, java.util.Date nextUpdate, java.math.BigInteger crlNumber, java.lang.Long crlSize)
      Updates CRL issuing point record.
      void updateCRLIssuingPointRecord​(java.lang.String id, byte[] newCRL, java.util.Date thisUpdate, java.util.Date nextUpdate, java.math.BigInteger crlNumber, java.lang.Long crlSize, java.util.Hashtable<java.math.BigInteger,​org.mozilla.jss.netscape.security.x509.RevokedCertificate> revokedCerts, java.util.Hashtable<java.math.BigInteger,​org.mozilla.jss.netscape.security.x509.RevokedCertificate> unrevokedCerts, java.util.Hashtable<java.math.BigInteger,​org.mozilla.jss.netscape.security.x509.RevokedCertificate> expiredCerts)
      Updates CRL issuing point record.
      void updateDeltaCRL​(java.lang.String id, java.math.BigInteger deltaCRLNumber, java.lang.Long deltaCRLSize, java.util.Date nextUpdate, byte[] deltaCRL)
      Updates CRL issuing point record with delta-CRL.
      void updateExpiredCerts​(java.lang.String id, java.util.Hashtable<java.math.BigInteger,​org.mozilla.jss.netscape.security.x509.RevokedCertificate> expiredCerts)
      Updates CRL issuing point record with recently expired certificates info.
      void updateFirstUnsaved​(java.lang.String id, java.lang.String firstUnsaved)
      Updates CRL issuing point record with reference to the first unsaved data.
      void updateRevokedCerts​(java.lang.String id, java.util.Hashtable<java.math.BigInteger,​org.mozilla.jss.netscape.security.x509.RevokedCertificate> revokedCerts, java.util.Hashtable<java.math.BigInteger,​org.mozilla.jss.netscape.security.x509.RevokedCertificate> unrevokedCerts)
      Updates CRL issuing point record with recently revoked certificates info.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • logger

        public static org.slf4j.Logger logger
    • Constructor Detail

      • CRLRepository

        public CRLRepository​(DBSubsystem dbSubsystem,
                             int increment,
                             java.lang.String baseDN)
                      throws com.netscape.certsrv.dbs.EDBException
        Constructs a CRL repository.
        Throws:
        com.netscape.certsrv.dbs.EDBException
    • Method Detail

      • getDBSubsystem

        public DBSubsystem getDBSubsystem()
        Retrieves backend database handle.
      • getDN

        public java.lang.String getDN()
        Retrieves DN of this repository.
      • addCRLIssuingPointRecord

        public void addCRLIssuingPointRecord​(com.netscape.certsrv.dbs.crldb.ICRLIssuingPointRecord rec)
                                      throws EBaseException
        Adds CRL issuing points.
        Specified by:
        addCRLIssuingPointRecord in interface com.netscape.certsrv.dbs.crldb.ICRLRepository
        Parameters:
        rec - issuing point record
        Throws:
        EBaseException - failed to add new issuing point record
      • getIssuingPointsNames

        public java.util.Vector<java.lang.String> getIssuingPointsNames()
                                                                 throws EBaseException
        Retrieves all issuing points' names
        Specified by:
        getIssuingPointsNames in interface com.netscape.certsrv.dbs.crldb.ICRLRepository
        Returns:
        A list of issuing points' names.
        Throws:
        EBaseException - failed to retrieve all the issuing points' names.
      • readCRLIssuingPointRecord

        public com.netscape.certsrv.dbs.crldb.ICRLIssuingPointRecord readCRLIssuingPointRecord​(java.lang.String id)
                                                                                        throws EBaseException
        Reads issuing point record.
        Specified by:
        readCRLIssuingPointRecord in interface com.netscape.certsrv.dbs.crldb.ICRLRepository
        Returns:
        issuing point record
        Throws:
        EBaseException - failed to read issuing point record
      • deleteCRLIssuingPointRecord

        public void deleteCRLIssuingPointRecord​(java.lang.String id)
                                         throws EBaseException
        deletes issuing point record.
        Specified by:
        deleteCRLIssuingPointRecord in interface com.netscape.certsrv.dbs.crldb.ICRLRepository
        Parameters:
        id - issuing point record id
        Throws:
        EBaseException - failed to delete issuing point record
      • modifyCRLIssuingPointRecord

        public void modifyCRLIssuingPointRecord​(java.lang.String id,
                                                com.netscape.certsrv.dbs.ModificationSet mods)
                                         throws EBaseException
        Description copied from interface: com.netscape.certsrv.dbs.crldb.ICRLRepository
        Modifies issuing point record.
        Specified by:
        modifyCRLIssuingPointRecord in interface com.netscape.certsrv.dbs.crldb.ICRLRepository
        Parameters:
        id - issuing point record id
        mods - set of modifications
        Throws:
        EBaseException - failed to modify issuing point record
      • updateCRLIssuingPointRecord

        public void updateCRLIssuingPointRecord​(java.lang.String id,
                                                byte[] newCRL,
                                                java.util.Date thisUpdate,
                                                java.util.Date nextUpdate,
                                                java.math.BigInteger crlNumber,
                                                java.lang.Long crlSize)
                                         throws EBaseException
        Updates CRL issuing point record.
        Specified by:
        updateCRLIssuingPointRecord in interface com.netscape.certsrv.dbs.crldb.ICRLRepository
        Parameters:
        id - issuing point record id
        newCRL - encoded binary CRL
        thisUpdate - time of this update
        nextUpdate - time of next update
        crlNumber - CRL number
        crlSize - CRL size
        Throws:
        EBaseException - failed to update issuing point record
      • updateCRLIssuingPointRecord

        public void updateCRLIssuingPointRecord​(java.lang.String id,
                                                byte[] newCRL,
                                                java.util.Date thisUpdate,
                                                java.util.Date nextUpdate,
                                                java.math.BigInteger crlNumber,
                                                java.lang.Long crlSize,
                                                java.util.Hashtable<java.math.BigInteger,​org.mozilla.jss.netscape.security.x509.RevokedCertificate> revokedCerts,
                                                java.util.Hashtable<java.math.BigInteger,​org.mozilla.jss.netscape.security.x509.RevokedCertificate> unrevokedCerts,
                                                java.util.Hashtable<java.math.BigInteger,​org.mozilla.jss.netscape.security.x509.RevokedCertificate> expiredCerts)
                                         throws EBaseException
        Updates CRL issuing point record.
        Specified by:
        updateCRLIssuingPointRecord in interface com.netscape.certsrv.dbs.crldb.ICRLRepository
        Parameters:
        id - issuing point record id
        newCRL - encoded binary CRL
        thisUpdate - time of this update
        nextUpdate - time of next update
        crlNumber - CRL number
        crlSize - CRL size
        revokedCerts - list of revoked certificates
        unrevokedCerts - list of released from hold certificates
        expiredCerts - list of expired certificates
        Throws:
        EBaseException - failed to update issuing point record
      • updateRevokedCerts

        public void updateRevokedCerts​(java.lang.String id,
                                       java.util.Hashtable<java.math.BigInteger,​org.mozilla.jss.netscape.security.x509.RevokedCertificate> revokedCerts,
                                       java.util.Hashtable<java.math.BigInteger,​org.mozilla.jss.netscape.security.x509.RevokedCertificate> unrevokedCerts)
                                throws EBaseException
        Updates CRL issuing point record with recently revoked certificates info.
        Specified by:
        updateRevokedCerts in interface com.netscape.certsrv.dbs.crldb.ICRLRepository
        Parameters:
        id - issuing point record id
        revokedCerts - list of revoked certificates
        unrevokedCerts - list of released from hold certificates
        Throws:
        EBaseException - failed to update issuing point record
      • updateExpiredCerts

        public void updateExpiredCerts​(java.lang.String id,
                                       java.util.Hashtable<java.math.BigInteger,​org.mozilla.jss.netscape.security.x509.RevokedCertificate> expiredCerts)
                                throws EBaseException
        Updates CRL issuing point record with recently expired certificates info.
        Specified by:
        updateExpiredCerts in interface com.netscape.certsrv.dbs.crldb.ICRLRepository
        Parameters:
        id - issuing point record id
        expiredCerts - list of expired certificates
        Throws:
        EBaseException - failed to update issuing point record
      • updateCRLCache

        public void updateCRLCache​(java.lang.String id,
                                   java.lang.Long crlSize,
                                   java.util.Hashtable<java.math.BigInteger,​org.mozilla.jss.netscape.security.x509.RevokedCertificate> revokedCerts,
                                   java.util.Hashtable<java.math.BigInteger,​org.mozilla.jss.netscape.security.x509.RevokedCertificate> unrevokedCerts,
                                   java.util.Hashtable<java.math.BigInteger,​org.mozilla.jss.netscape.security.x509.RevokedCertificate> expiredCerts)
                            throws EBaseException
        Updates CRL issuing point record with CRL cache info.
        Specified by:
        updateCRLCache in interface com.netscape.certsrv.dbs.crldb.ICRLRepository
        Parameters:
        id - issuing point record id
        crlSize - CRL size
        revokedCerts - list of revoked certificates
        unrevokedCerts - list of released from hold certificates
        expiredCerts - list of expired certificates
        Throws:
        EBaseException - failed to update issuing point record
      • updateDeltaCRL

        public void updateDeltaCRL​(java.lang.String id,
                                   java.math.BigInteger deltaCRLNumber,
                                   java.lang.Long deltaCRLSize,
                                   java.util.Date nextUpdate,
                                   byte[] deltaCRL)
                            throws EBaseException
        Updates CRL issuing point record with delta-CRL.
        Specified by:
        updateDeltaCRL in interface com.netscape.certsrv.dbs.crldb.ICRLRepository
        Parameters:
        id - issuing point record id
        deltaCRLNumber - delta CRL number
        deltaCRLSize - delta CRL size
        nextUpdate - time of next update
        deltaCRL - delta CRL in binary form
        Throws:
        EBaseException - failed to update issuing point record
      • updateFirstUnsaved

        public void updateFirstUnsaved​(java.lang.String id,
                                       java.lang.String firstUnsaved)
                                throws EBaseException
        Description copied from interface: com.netscape.certsrv.dbs.crldb.ICRLRepository
        Updates CRL issuing point record with reference to the first unsaved data.
        Specified by:
        updateFirstUnsaved in interface com.netscape.certsrv.dbs.crldb.ICRLRepository
        Parameters:
        id - issuing point record id
        firstUnsaved - reference to the first unsaved data
        Throws:
        EBaseException - failed to update issuing point record