Class KeyRecord

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

    public class KeyRecord
    extends java.lang.Object
    implements IKeyRecord
    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:
    Serialized Form
    • Field Detail

      • mNames

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

      • KeyRecord

        public KeyRecord()
        Constructs empty key record.
      • KeyRecord

        public KeyRecord​(java.math.BigInteger serialNo,
                         byte[] publicData,
                         byte[] privateData,
                         java.lang.String owner,
                         java.lang.String algorithm,
                         java.lang.String agentId)
                  throws EBaseException
        Throws:
        EBaseException
    • Method Detail

      • set

        public void set​(java.lang.String name,
                        java.lang.Object object)
                 throws EBaseException
        Sets an attribute.

        Specified by:
        set in interface IAttrSet
        Parameters:
        name - the name of the attribute
        object - the attribute object.
        Throws:
        EBaseException - on attribute handling errors.
      • get

        public java.lang.Object get​(java.lang.String name)
                             throws EBaseException
        Retrieves an attribute.

        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 an attribute.

        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()
        Retrieves an enumeration of attributes.

        Specified by:
        getElements in interface IAttrSet
        Returns:
        an enumeration of the attribute names.
      • getSerializableAttrNames

        public java.util.Enumeration<java.lang.String> getSerializableAttrNames()
        Retrieves serializable attribute names.
        Specified by:
        getSerializableAttrNames in interface IDBObj
        Returns:
        a list of serializable attribute names
      • getSerialNumber

        public java.math.BigInteger getSerialNumber()
                                             throws EBaseException
        Retrieves serial number of the key record. Each key record is uniquely identified by serial number.

        Specified by:
        getSerialNumber in interface IKeyRecord
        Returns:
        serial number of this key record
        Throws:
        EBaseException - failed to retrieve key id
      • setSerialNumber

        public void setSerialNumber​(java.math.BigInteger serialno)
                             throws EBaseException
        Sets serial number.
        Throws:
        EBaseException
      • getArchivedBy

        public java.lang.String getArchivedBy()
        Retrieves the uid of person who archived this record.
        Specified by:
        getArchivedBy in interface IKeyRecord
        Returns:
        archiver uid
      • setDateOfRevocation

        public void setDateOfRevocation​(java.util.Date[] dates)
                                 throws EBaseException
        Sets the date of revocation.

        Throws:
        EBaseException
      • getAlgorithm

        public java.lang.String getAlgorithm()
        Retrieves algorithm of the key pair.
        Specified by:
        getAlgorithm in interface IKeyRecord
        Returns:
        key algorithm
      • getCreateTime

        public java.util.Date getCreateTime()
        Retrieves the creation time of this record.
        Specified by:
        getCreateTime in interface IKeyRecord
        Returns:
        creation time
      • getModifyTime

        public java.util.Date getModifyTime()
        Retrieves the last modification time of this record.
        Specified by:
        getModifyTime in interface IKeyRecord
        Returns:
        modification time
      • getRealm

        public java.lang.String getRealm()
                                  throws EBaseException
        Description copied from interface: IKeyRecord
        Retrieves authorization realm.
        Specified by:
        getRealm in interface IKeyRecord
        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 java.lang.Exception
        Specified by:
        setWrappingParams in interface IKeyRecord
        Throws:
        java.lang.Exception
      • getWrappingParams

        public org.mozilla.jss.netscape.security.util.WrappingParams getWrappingParams​(org.mozilla.jss.netscape.security.util.WrappingParams oldParams)
                                                                                throws java.lang.Exception
        Specified by:
        getWrappingParams in interface IKeyRecord
        Throws:
        java.lang.Exception