Class KeyRecord
java.lang.Object
com.netscape.cmscore.dbs.DBRecord
com.netscape.cmscore.dbs.KeyRecord
- All Implemented Interfaces:
IAttrSet, IDBObj, 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.
- Author:
- thomask
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
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 meta info.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
-
ATTR_ID
- See Also:
-
ATTR_STATE
- See Also:
-
ATTR_ALGORITHM
- See Also:
-
ATTR_KEY_SIZE
- See Also:
-
ATTR_OWNER_NAME
- See Also:
-
ATTR_PRIVATE_KEY_DATA
- See Also:
-
ATTR_PUBLIC_KEY_DATA
- See Also:
-
ATTR_DATE_OF_RECOVERY
- See Also:
-
ATTR_CREATE_TIME
- See Also:
-
ATTR_MODIFY_TIME
- See Also:
-
ATTR_META_INFO
- See Also:
-
ATTR_ARCHIVED_BY
- See Also:
-
ATTR_CLIENT_ID
- See Also:
-
ATTR_DATA_TYPE
- See Also:
-
ATTR_STATUS
- See Also:
-
ATTR_REALM
- See Also:
-
STATUS_ANY
- See Also:
-
STATUS_VALID
- See Also:
-
STATUS_INVALID
- See Also:
-
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- Overrides:
setin classDBRecord- Parameters:
name- the name of the attributeobject- the attribute object.- Throws:
EBaseException- on attribute handling errors.
-
get
Retrieves an attribute.- Specified by:
getin interfaceIAttrSet- Overrides:
getin classDBRecord- Parameters:
name- the name of the attribute to return.- Throws:
EBaseException- on attribute handling errors.
-
delete
Deletes an attribute.- Specified by:
deletein interfaceIAttrSet- Overrides:
deletein classDBRecord- 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- Overrides:
getElementsin classDBRecord- Returns:
- an enumeration of the attribute names.
-
getSerializableAttrNames
Retrieves serializable attribute names.- Specified by:
getSerializableAttrNamesin interfaceIDBObj- Overrides:
getSerializableAttrNamesin classDBRecord- Returns:
- a list of serializable attribute names
-
getSerialNumber
Retrieves serial number of the key record. Each key record is uniquely identified by serial number.- Returns:
- serial number of this key record
- Throws:
EBaseException- failed to retrieve key serial number
-
setSerialNumber
Sets serial number.- Throws:
EBaseException
-
getState
Retrieves the key state. This gives key life cycle information.- Returns:
- key state
- Throws:
EBaseException- failed to retrieve state of the key
-
setState
-
getArchivedBy
Retrieves the uid of person who archived this record.- Returns:
- archiver uid
-
getPrivateKeyData
Retrieves key.- Returns:
- archived key
- Throws:
EBaseException
-
setPrivateKeyData
Sets key data.- Throws:
EBaseException
-
getKeySize
Retrieves the key size.- Returns:
- key size
- Throws:
EBaseException- failed to retrieve key size
-
getMetaInfo
-
setKeySize
-
getOwnerName
Retrieves owner name.- Returns:
- key owner name
- Throws:
EBaseException- failed to retrieve key owner name
-
setOwnerName
-
getPublicKeyData
Retrieves the public key.- 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.- Returns:
- revocation history
- Throws:
EBaseException- failed to retrieve revocation history
-
setDateOfRevocation
Sets the date of revocation.- Throws:
EBaseException
-
getAlgorithm
-
getCreateTime
-
getModifyTime
Retrieves the last modification time of this record.- Returns:
- modification time
-
getClientId
Retrieves the client ID of this record.- Returns:
- client id
- Throws:
EBaseException- failed to retrieve client id
-
getKeyStatus
Retrieves the key status of this record.- Returns:
- key status
- Throws:
EBaseException- failed to retrieve key status
-
getDataType
Retrieves the key data type of this record.- Returns:
- data type
- Throws:
EBaseException- failed to retrieve data type
-
getRealm
Retrieves authorization realm.- Returns:
- authorization realm
- Throws:
EBaseException- failed to retrieve authorization realm
-
setWrappingParams
-
getWrappingParams
-
isEncrypted
- Throws:
EBaseException
-