Class CertRecord

  • All Implemented Interfaces:
    IAttrSet, IDBObj, java.io.Serializable

    public class CertRecord
    extends java.lang.Object
    implements IDBObj
    A class represents a serializable certificate record.

    Version:
    $Revision$, $Date$
    Author:
    thomask
    See Also:
    Serialized Form
    • Field Detail

      • logger

        public static org.slf4j.Logger logger
      • ATTR_CERT_STATUS

        public static final java.lang.String ATTR_CERT_STATUS
        See Also:
        Constant Field Values
      • ATTR_CREATE_TIME

        public static final java.lang.String ATTR_CREATE_TIME
        See Also:
        Constant Field Values
      • ATTR_MODIFY_TIME

        public static final java.lang.String ATTR_MODIFY_TIME
        See Also:
        Constant Field Values
      • META_LDAPPUBLISH

        public static final java.lang.String META_LDAPPUBLISH
        See Also:
        Constant Field Values
      • META_RENEWED_CERT

        public static final java.lang.String META_RENEWED_CERT
        See Also:
        Constant Field Values
      • META_CHALLENGE_PHRASE

        public static final java.lang.String META_CHALLENGE_PHRASE
        See Also:
        Constant Field Values
      • STATUS_REVOKED_EXPIRED

        public static final java.lang.String STATUS_REVOKED_EXPIRED
        See Also:
        Constant Field Values
      • AUTO_RENEWAL_DISABLED

        public static final java.lang.String AUTO_RENEWAL_DISABLED
        See Also:
        Constant Field Values
      • AUTO_RENEWAL_ENABLED

        public static final java.lang.String AUTO_RENEWAL_ENABLED
        See Also:
        Constant Field Values
      • AUTO_RENEWAL_DONE

        public static final java.lang.String AUTO_RENEWAL_DONE
        See Also:
        Constant Field Values
      • AUTO_RENEWAL_NOTIFIED

        public static final java.lang.String AUTO_RENEWAL_NOTIFIED
        See Also:
        Constant Field Values
      • X509CERT_NOT_BEFORE

        public static final java.lang.String X509CERT_NOT_BEFORE
        See Also:
        Constant Field Values
      • X509CERT_NOT_AFTER

        public static final java.lang.String X509CERT_NOT_AFTER
        See Also:
        Constant Field Values
      • X509CERT_DURATION

        public static final java.lang.String X509CERT_DURATION
        See Also:
        Constant Field Values
      • X509CERT_EXTENSION

        public static final java.lang.String X509CERT_EXTENSION
        See Also:
        Constant Field Values
      • X509CERT_SUBJECT

        public static final java.lang.String X509CERT_SUBJECT
        See Also:
        Constant Field Values
      • X509CERT_PUBLIC_KEY_DATA

        public static final java.lang.String X509CERT_PUBLIC_KEY_DATA
        See Also:
        Constant Field Values
      • X509CERT_VERSION

        public static final java.lang.String X509CERT_VERSION
        See Also:
        Constant Field Values
      • X509CERT_ALGORITHM

        public static final java.lang.String X509CERT_ALGORITHM
        See Also:
        Constant Field Values
      • X509CERT_SIGNING_ALGORITHM

        public static final java.lang.String X509CERT_SIGNING_ALGORITHM
        See Also:
        Constant Field Values
      • X509CERT_SERIAL_NUMBER

        public static final java.lang.String X509CERT_SERIAL_NUMBER
        See Also:
        Constant Field Values
      • ATTR_X509CERT_NOT_BEFORE

        public static final java.lang.String ATTR_X509CERT_NOT_BEFORE
        See Also:
        Constant Field Values
      • ATTR_X509CERT_NOT_AFTER

        public static final java.lang.String ATTR_X509CERT_NOT_AFTER
        See Also:
        Constant Field Values
      • ATTR_X509CERT_DURATION

        public static final java.lang.String ATTR_X509CERT_DURATION
        See Also:
        Constant Field Values
      • ATTR_X509CERT_EXTENSION

        public static final java.lang.String ATTR_X509CERT_EXTENSION
        See Also:
        Constant Field Values
      • ATTR_X509CERT_SUBJECT

        public static final java.lang.String ATTR_X509CERT_SUBJECT
        See Also:
        Constant Field Values
      • ATTR_X509CERT_ISSUER

        public static final java.lang.String ATTR_X509CERT_ISSUER
        See Also:
        Constant Field Values
      • ATTR_X509CERT_VERSION

        public static final java.lang.String ATTR_X509CERT_VERSION
        See Also:
        Constant Field Values
      • ATTR_X509CERT_ALGORITHM

        public static final java.lang.String ATTR_X509CERT_ALGORITHM
        See Also:
        Constant Field Values
      • ATTR_X509CERT_SIGNING_ALGORITHM

        public static final java.lang.String ATTR_X509CERT_SIGNING_ALGORITHM
        See Also:
        Constant Field Values
      • ATTR_X509CERT_SERIAL_NUMBER

        public static final java.lang.String ATTR_X509CERT_SERIAL_NUMBER
        See Also:
        Constant Field Values
      • ATTR_X509CERT_PUBLIC_KEY_DATA

        public static final java.lang.String ATTR_X509CERT_PUBLIC_KEY_DATA
        See Also:
        Constant Field Values
      • mNames

        protected static java.util.Vector<java.lang.String> mNames
    • Constructor Detail

      • CertRecord

        public CertRecord()
        Constructs empty certificate record.
      • CertRecord

        public CertRecord​(java.math.BigInteger id,
                          java.security.cert.Certificate cert,
                          MetaInfo meta)
        Constructs certiificate record with certificate and meta info.
    • Method Detail

      • set

        public void set​(java.lang.String name,
                        java.lang.Object obj)
                 throws EBaseException
        Sets attribute to this record.
        Specified by:
        set in interface IAttrSet
        Parameters:
        name - the name of the attribute
        obj - the attribute object.
        Throws:
        EBaseException - on attribute handling errors.
      • get

        public java.lang.Object get​(java.lang.String name)
                             throws EBaseException
        Retrieves attributes from this record.
        Specified by:
        get in interface IAttrSet
        Parameters:
        name - the name of the attribute to return.
        Throws:
        EBaseException - on attribute handling errors.
      • delete

        public void delete​(java.lang.String name)
                    throws EBaseException
        Deletes attribute from this record.
        Specified by:
        delete in interface IAttrSet
        Parameters:
        name - the name of the attribute to delete.
        Throws:
        EBaseException - on attribute handling errors.
      • getElements

        public java.util.Enumeration<java.lang.String> getElements()
        Description copied from interface: IAttrSet
        Returns an enumeration of the names of the attributes existing within this AttrSet.
        Specified by:
        getElements in interface IAttrSet
        Returns:
        an enumeration of the attribute names.
      • getSerializableAttrNames

        public java.util.Enumeration<java.lang.String> getSerializableAttrNames()
        Description copied from interface: IDBObj
        Returns a list of serializable attribute names. This method should return the attribute name even if there is no attribute value for the attribute.
        Specified by:
        getSerializableAttrNames in interface IDBObj
        Returns:
        a list of serializable attribute names
      • getCertificate

        public org.mozilla.jss.netscape.security.x509.X509CertImpl getCertificate()
        Retrieves certificate from certificate record.
        Returns:
        certificate
      • getMetaInfo

        public MetaInfo getMetaInfo()
        Retrieves meta information.
        Returns:
        meta information
      • getStatus

        public java.lang.String getStatus()
        Retrieves certificate status.
        Returns:
        certificate status
      • getAutoRenew

        public java.lang.String getAutoRenew()
        Retrieves the auto renew mode.
      • getRevocationInfo

        public IRevocationInfo getRevocationInfo()
        Retrieves revocation information.
        Returns:
        revocation information
      • getSerialNumber

        public java.math.BigInteger getSerialNumber()
        Retrieves serial number of this record. Usually, it is the same of the serial number of the associated certificate.
        Returns:
        certificate serial number
      • getIssuedBy

        public java.lang.String getIssuedBy()
        Retrieves name of which user issued this certificate.
        Returns:
        name of which user issued this certificate
      • getRevokedBy

        public java.lang.String getRevokedBy()
        Retrieves name of who revoked this certificate.
        Returns:
        name of who revoked this certificate
      • getRevokedOn

        public java.util.Date getRevokedOn()
        Retrieves date when this certificate was revoked.
        Returns:
        date when this certificate was revoked
      • getCertificateSerialNumber

        public java.math.BigInteger getCertificateSerialNumber()
        Retrieves serial number from stored certificate.
        Returns:
        certificate serial number
      • getNotAfter

        public java.util.Date getNotAfter()
        Retrieves not after.
      • getNotBefore

        public java.util.Date getNotBefore()
      • getRevocationDate

        public java.util.Date getRevocationDate()
                                         throws EDBException
        Return revocation date.
        Throws:
        EDBException
      • getCreateTime

        public java.util.Date getCreateTime()
        Retrieves time of creation of this certificate record.
        Returns:
        time of creation of this certificate record
      • getModifyTime

        public java.util.Date getModifyTime()
        Retrieves time of modification of this certificate record.
        Returns:
        time of modification of this certificate record
      • getRevReason

        public org.mozilla.jss.netscape.security.x509.RevocationReason getRevReason()
                                                                             throws EBaseException,
                                                                                    org.mozilla.jss.netscape.security.x509.X509ExtensionException
        Throws:
        EBaseException
        org.mozilla.jss.netscape.security.x509.X509ExtensionException
      • isCertOnHold

        public boolean isCertOnHold()
        Is this cert on hold?
      • toString

        public java.lang.String toString()
        String representation
        Overrides:
        toString in class java.lang.Object