Class KeyRecord
java.lang.Object
com.netscape.cmscore.dbs.KeyRecord
- All Implemented Interfaces:
IAttrSet,IDBObj,IKeyRecord,Serializable
A class represents a Key record. It maintains the key
life cycle as well as other information about an
archived key. Namely, whether a key is inactive because
of compromise.
- Version:
- $Revision$, $Date$
- Author:
- thomask
- See Also:
-
Field Summary
FieldsFields inherited from interface com.netscape.certsrv.dbs.keydb.IKeyRecord
ATTR_ALGORITHM, ATTR_ARCHIVED_BY, ATTR_CLIENT_ID, ATTR_CREATE_TIME, ATTR_DATA_TYPE, ATTR_DATE_OF_RECOVERY, ATTR_ID, ATTR_KEY_SIZE, ATTR_META_INFO, ATTR_MODIFY_TIME, ATTR_OWNER_NAME, ATTR_PRIVATE_KEY_DATA, ATTR_PUBLIC_KEY_DATA, ATTR_REALM, ATTR_STATE, ATTR_STATUS, STATUS_ANY, STATUS_INVALID, STATUS_VALID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeletes an attribute.Retrieves an attribute.Retrieves algorithm of the key pair.Retrieves the uid of person who archived this record.Retrieves the client ID of this record.Retrieves the creation time of this record.Retrieves the key data type of this record.Date[]Retrieves the date(s) of revocation.Retrieves an enumeration of attributes.Retrieves the key size.Retrieves the key status of this record.Retrieves the metaInfo.Retrieves the last modification time of this record.Retrieves owner name.byte[]Retrieves key.byte[]Retrieves the public key.getRealm()Retrieves authorization realm.Retrieves serializable attribute names.Retrieves serial number of the key record.getState()Retrieves the key state.org.mozilla.jss.netscape.security.util.WrappingParamsgetWrappingParams(org.mozilla.jss.netscape.security.util.WrappingParams oldParams) voidSets an attribute.voidsetDateOfRevocation(Date[] dates) Sets the date of revocation.voidsetKeySize(Integer keySize) Sets key size.voidsetOwnerName(String name) Sets owner name.voidsetPrivateKeyData(byte[] keydata) Sets key data.voidsetPublicKeyData(byte[] key) Sets the public key.voidsetSerialNumber(BigInteger serialno) Sets serial number.voidSets key state.voidsetWrappingParams(org.mozilla.jss.netscape.security.util.WrappingParams params, boolean doEncrypt)
-
Field Details
-
mNames
-
-
Constructor Details
-
KeyRecord
public KeyRecord()Constructs empty key record. -
KeyRecord
public KeyRecord(BigInteger serialNo, byte[] publicData, byte[] privateData, String owner, String algorithm, String agentId) throws EBaseException - Throws:
EBaseException
-
-
Method Details
-
set
Sets an attribute.- Specified by:
setin interfaceIAttrSet- Parameters:
name- the name of the attributeobject- the attribute object.- Throws:
EBaseException- on attribute handling errors.
-
get
Retrieves an attribute.- Specified by:
getin interfaceIAttrSet- Parameters:
name- the name of the attribute to return.- Throws:
EBaseException- on attribute handling errors.
-
delete
Deletes an attribute.- Specified by:
deletein interfaceIAttrSet- Parameters:
name- the name of the attribute to delete.- Throws:
EBaseException- on attribute handling errors.
-
getElements
Retrieves an enumeration of attributes.- Specified by:
getElementsin interfaceIAttrSet- Returns:
- an enumeration of the attribute names.
-
getSerializableAttrNames
Retrieves serializable attribute names.- Specified by:
getSerializableAttrNamesin interfaceIDBObj- Returns:
- a list of serializable attribute names
-
getSerialNumber
Retrieves serial number of the key record. Each key record is uniquely identified by serial number.- Specified by:
getSerialNumberin interfaceIKeyRecord- Returns:
- serial number of this key record
- Throws:
EBaseException- failed to retrieve key id
-
setSerialNumber
Sets serial number.- Throws:
EBaseException
-
getState
Retrieves the key state. This gives key life cycle information.- Specified by:
getStatein interfaceIKeyRecord- Returns:
- key state
- Throws:
EBaseException- failed to retrieve state of the key
-
setState
-
getArchivedBy
Retrieves the uid of person who archived this record.- Specified by:
getArchivedByin interfaceIKeyRecord- Returns:
- archiver uid
-
getPrivateKeyData
Retrieves key.- Returns:
- archived key
- Throws:
EBaseException
-
setPrivateKeyData
Sets key data.- Throws:
EBaseException
-
getKeySize
Retrieves the key size.- Specified by:
getKeySizein interfaceIKeyRecord- Returns:
- key size
- Throws:
EBaseException- failed to retrieve key length
-
getMetaInfo
Retrieves the metaInfo.- Specified by:
getMetaInfoin interfaceIKeyRecord- Returns:
- metaInfo
-
setKeySize
-
getOwnerName
Retrieves owner name.- Specified by:
getOwnerNamein interfaceIKeyRecord- Returns:
- key owner name
- Throws:
EBaseException- failed to retrieve key owner name
-
setOwnerName
-
getPublicKeyData
Retrieves the public key.- Specified by:
getPublicKeyDatain interfaceIKeyRecord- Returns:
- public key data
- Throws:
EBaseException- failed to retrieve public key data
-
setPublicKeyData
Sets the public key.- Throws:
EBaseException
-
getDateOfRevocation
Retrieves the date(s) of revocation.- Specified by:
getDateOfRevocationin interfaceIKeyRecord- Returns:
- recovery history
- Throws:
EBaseException- failed to retrieve recovery history
-
setDateOfRevocation
Sets the date of revocation.- Throws:
EBaseException
-
getAlgorithm
Retrieves algorithm of the key pair.- Specified by:
getAlgorithmin interfaceIKeyRecord- Returns:
- key algorithm
-
getCreateTime
Retrieves the creation time of this record.- Specified by:
getCreateTimein interfaceIKeyRecord- Returns:
- creation time
-
getModifyTime
Retrieves the last modification time of this record.- Specified by:
getModifyTimein interfaceIKeyRecord- Returns:
- modification time
-
getClientId
Retrieves the client ID of this record.- Specified by:
getClientIdin interfaceIKeyRecord- Returns:
- client id
- Throws:
EBaseException- failed to retrieve client id
-
getKeyStatus
Retrieves the key status of this record.- Specified by:
getKeyStatusin interfaceIKeyRecord- Returns:
- key status
- Throws:
EBaseException- failed to retrieve key status
-
getDataType
Retrieves the key data type of this record.- Specified by:
getDataTypein interfaceIKeyRecord- Returns:
- data type
- Throws:
EBaseException- failed to retrieve data type
-
getRealm
Description copied from interface:IKeyRecordRetrieves authorization realm.- Specified by:
getRealmin interfaceIKeyRecord- Returns:
- authorization realm
- Throws:
EBaseException- failed to retrieve authorization realm
-
setWrappingParams
public void setWrappingParams(org.mozilla.jss.netscape.security.util.WrappingParams params, boolean doEncrypt) throws Exception - Specified by:
setWrappingParamsin interfaceIKeyRecord- Throws:
Exception
-
getWrappingParams
public org.mozilla.jss.netscape.security.util.WrappingParams getWrappingParams(org.mozilla.jss.netscape.security.util.WrappingParams oldParams) throws Exception - Specified by:
getWrappingParamsin interfaceIKeyRecord- Throws:
Exception
-
isEncrypted
- Specified by:
isEncryptedin interfaceIKeyRecord- Throws:
EBaseException
-