Package com.netscape.cmscore.dbs
Class CertRecord
- java.lang.Object
-
- com.netscape.cmscore.dbs.CertRecord
-
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 Summary
Fields Modifier and Type Field Description static java.lang.String
ATTR_AUTO_RENEW
static java.lang.String
ATTR_CERT_STATUS
static java.lang.String
ATTR_CREATE_TIME
static java.lang.String
ATTR_ID
static java.lang.String
ATTR_ISSUED_BY
static java.lang.String
ATTR_META_INFO
static java.lang.String
ATTR_MODIFY_TIME
static java.lang.String
ATTR_REVO_INFO
static java.lang.String
ATTR_REVOKED_BY
static java.lang.String
ATTR_REVOKED_ON
static java.lang.String
ATTR_X509CERT
static java.lang.String
ATTR_X509CERT_ALGORITHM
static java.lang.String
ATTR_X509CERT_DURATION
static java.lang.String
ATTR_X509CERT_EXTENSION
static java.lang.String
ATTR_X509CERT_ISSUER
static java.lang.String
ATTR_X509CERT_NOT_AFTER
static java.lang.String
ATTR_X509CERT_NOT_BEFORE
static java.lang.String
ATTR_X509CERT_PUBLIC_KEY_DATA
static java.lang.String
ATTR_X509CERT_SERIAL_NUMBER
static java.lang.String
ATTR_X509CERT_SIGNING_ALGORITHM
static java.lang.String
ATTR_X509CERT_SUBJECT
static java.lang.String
ATTR_X509CERT_VERSION
static java.lang.String
AUTO_RENEWAL_DISABLED
static java.lang.String
AUTO_RENEWAL_DONE
static java.lang.String
AUTO_RENEWAL_ENABLED
static java.lang.String
AUTO_RENEWAL_NOTIFIED
static org.slf4j.Logger
logger
static java.lang.String
META_CERT_TYPE
static java.lang.String
META_CHALLENGE_PHRASE
static java.lang.String
META_CRMF_REQID
static java.lang.String
META_LDAPPUBLISH
static java.lang.String
META_OLD_CERT
static java.lang.String
META_PROFILE_ID
static java.lang.String
META_RENEWED_CERT
static java.lang.String
META_REQUEST_ID
static java.lang.String
META_REV_SHRTOK
protected static java.util.Vector<java.lang.String>
mNames
static java.lang.String
STATUS_EXPIRED
static java.lang.String
STATUS_INVALID
static java.lang.String
STATUS_REVOKED
static java.lang.String
STATUS_REVOKED_EXPIRED
static java.lang.String
STATUS_VALID
static java.lang.String
X509CERT_ALGORITHM
static java.lang.String
X509CERT_DURATION
static java.lang.String
X509CERT_EXTENSION
static java.lang.String
X509CERT_ISSUER
static java.lang.String
X509CERT_NOT_AFTER
static java.lang.String
X509CERT_NOT_BEFORE
static java.lang.String
X509CERT_PUBLIC_KEY_DATA
static java.lang.String
X509CERT_SERIAL_NUMBER
static java.lang.String
X509CERT_SIGNING_ALGORITHM
static java.lang.String
X509CERT_SUBJECT
static java.lang.String
X509CERT_VERSION
-
Constructor Summary
Constructors Constructor Description CertRecord()
Constructs empty certificate record.CertRecord(java.math.BigInteger id, java.security.cert.Certificate cert, MetaInfo meta)
Constructs certiificate record with certificate and meta info.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete(java.lang.String name)
Deletes attribute from this record.java.lang.Object
get(java.lang.String name)
Retrieves attributes from this record.java.lang.String
getAutoRenew()
Retrieves the auto renew mode.org.mozilla.jss.netscape.security.x509.X509CertImpl
getCertificate()
Retrieves certificate from certificate record.java.math.BigInteger
getCertificateSerialNumber()
Retrieves serial number from stored certificate.java.util.Date
getCreateTime()
Retrieves time of creation of this certificate record.java.util.Enumeration<java.lang.String>
getElements()
Returns an enumeration of the names of the attributes existing within this AttrSet.java.lang.String
getIssuedBy()
Retrieves name of which user issued this certificate.MetaInfo
getMetaInfo()
Retrieves meta information.java.util.Date
getModifyTime()
Retrieves time of modification of this certificate record.java.util.Date
getNotAfter()
Retrieves not after.java.util.Date
getNotBefore()
java.util.Date
getRevocationDate()
Return revocation date.IRevocationInfo
getRevocationInfo()
Retrieves revocation information.java.lang.String
getRevokedBy()
Retrieves name of who revoked this certificate.java.util.Date
getRevokedOn()
Retrieves date when this certificate was revoked.org.mozilla.jss.netscape.security.x509.RevocationReason
getRevReason()
java.util.Enumeration<java.lang.String>
getSerializableAttrNames()
Returns a list of serializable attribute names.java.math.BigInteger
getSerialNumber()
Retrieves serial number of this record.java.lang.String
getStatus()
Retrieves certificate status.boolean
isCertOnHold()
Is this cert on hold?void
set(java.lang.String name, java.lang.Object obj)
Sets attribute to this record.java.lang.String
toString()
String representation
-
-
-
Field Detail
-
logger
public static org.slf4j.Logger logger
-
ATTR_ID
public static final java.lang.String ATTR_ID
- See Also:
- Constant Field Values
-
ATTR_META_INFO
public static final java.lang.String ATTR_META_INFO
- See Also:
- Constant Field Values
-
ATTR_REVO_INFO
public static final java.lang.String ATTR_REVO_INFO
- See Also:
- Constant Field Values
-
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
-
ATTR_AUTO_RENEW
public static final java.lang.String ATTR_AUTO_RENEW
- See Also:
- Constant Field Values
-
ATTR_ISSUED_BY
public static final java.lang.String ATTR_ISSUED_BY
- See Also:
- Constant Field Values
-
ATTR_REVOKED_BY
public static final java.lang.String ATTR_REVOKED_BY
- See Also:
- Constant Field Values
-
ATTR_REVOKED_ON
public static final java.lang.String ATTR_REVOKED_ON
- See Also:
- Constant Field Values
-
ATTR_X509CERT
public static final java.lang.String ATTR_X509CERT
- See Also:
- Constant Field Values
-
META_LDAPPUBLISH
public static final java.lang.String META_LDAPPUBLISH
- See Also:
- Constant Field Values
-
META_REQUEST_ID
public static final java.lang.String META_REQUEST_ID
- See Also:
- Constant Field Values
-
META_RENEWED_CERT
public static final java.lang.String META_RENEWED_CERT
- See Also:
- Constant Field Values
-
META_OLD_CERT
public static final java.lang.String META_OLD_CERT
- See Also:
- Constant Field Values
-
META_CERT_TYPE
public static final java.lang.String META_CERT_TYPE
- See Also:
- Constant Field Values
-
META_CRMF_REQID
public static final java.lang.String META_CRMF_REQID
- See Also:
- Constant Field Values
-
META_CHALLENGE_PHRASE
public static final java.lang.String META_CHALLENGE_PHRASE
- See Also:
- Constant Field Values
-
META_PROFILE_ID
public static final java.lang.String META_PROFILE_ID
- See Also:
- Constant Field Values
-
META_REV_SHRTOK
public static final java.lang.String META_REV_SHRTOK
- See Also:
- Constant Field Values
-
STATUS_VALID
public static final java.lang.String STATUS_VALID
- See Also:
- Constant Field Values
-
STATUS_INVALID
public static final java.lang.String STATUS_INVALID
- See Also:
- Constant Field Values
-
STATUS_REVOKED
public static final java.lang.String STATUS_REVOKED
- See Also:
- Constant Field Values
-
STATUS_EXPIRED
public static final java.lang.String STATUS_EXPIRED
- 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_ISSUER
public static final java.lang.String X509CERT_ISSUER
- 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 interfaceIAttrSet
- Parameters:
name
- the name of the attributeobj
- 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 interfaceIAttrSet
- 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 interfaceIAttrSet
- 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 interfaceIAttrSet
- 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 interfaceIDBObj
- 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 classjava.lang.Object
-
-