|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.xml.KeyInfo
This class builds and stores a KeyInfo
element.
It stores keys, names,
certificates, and other public-key management information, such as in-band
key distribution or key-agreement data. It is the base class for all types
of KeyInfo
. There are several kinds of
KeyInfo
, including:
KeyName
, KeyValue
,
X509Data
, RetrievalMethod
,
PGPData
, SPKIData
,
and MgmtData
. This class is an abstract class;
the subclasses implement the details.
See Also
Field Summary |
|
static int |
KEYNAME_KEYINFO
Specifies the |
static int |
KEYVALUE_KEYINFO
Specifies the |
static int |
MGMTDATA_KEYINFO
Specifies the |
static String |
MGMTDATA_TYPE
A URL defining the type value of |
static int |
PGPDATA_KEYINFO
Specifies the |
static String |
PGPDATA_TYPE
A URL defining the type value of |
static int |
RETRIEVALMETHOD_KEYINFO
Specifies the |
static int |
SPKIDATA_KEYINFO
Specifies the |
static String |
SPKIDATA_TYPE
A URL defining the type value of |
static String |
X509CERTIFICATE_TYPE
A URL defining the |
static int |
X509DATA_KEYINFO
Specifies the |
static String |
X509DATA_TYPE
A URL defining the type value of |
Constructor Summary |
|
KeyInfo()
|
Method Summary |
|
abstract org.w3c.dom.Element |
generateKeyInfo(org.w3c.dom.Document document,
String xmlNamespace,
String prefix)
Creates a DOM |
abstract Certificate[] |
getCertificates(CertJ certj)
Returns the certificates stored in this |
static KeyInfo |
getInstance(String keyInfoName)
Instantiates a particular |
abstract com.rsa.jsafe.JSAFE_PublicKey |
getKey()
Returns the public key. |
abstract String |
getKeyInfoName()
Returns the keyInfo name. |
abstract int |
getKeyInfoType()
Returns the keyInfo type. |
abstract boolean |
hasCertificate()
Determines whether keyInfo contains certificates. |
abstract boolean |
hasKey()
Determines whether this keyInfo contains a public key. |
abstract void |
parseKeyInfo(org.w3c.dom.Element keyInfoNode,
String xmlNamespace)
Processes the keyInfoNode and retrieves the key or certificates stored in the keyInfoData. |
abstract void |
setCertificates(Certificate[] certificates)
Sets the certificates of this |
abstract void |
setKey(com.rsa.jsafe.JSAFE_PublicKey key)
Sets the key of this |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int KEYNAME_KEYINFO
KeyInfo
as a KeyName
that
contains a String
value to be used by the signer to
communicate a key identifier to the recipient.
Typically, KeyName
contains an identifier related to the
key pair used to sign the message, but it may contain other
protocol-related information that indirectly identifies a key pair.public static final int KEYVALUE_KEYINFO
KeyInfo
as a KeyValue
that
contains one or more public keys that might be useful in validating the
signature.public static final int X509DATA_KEYINFO
KeyInfo
as an X509Data
that
contains one or more identifiers of keys or X509 certificates that might
be useful for validation.public static final int RETRIEVALMETHOD_KEYINFO
KeyInfo
as a RetrievalMethod
that
is used to convey a pointer to KeyInfo
-like information that
is stored at a remote location.public static final int PGPDATA_KEYINFO
KeyInfo
as a PGPData
that is used
to convey information to PGP public-key pairs and signatures on such keys.public static final int SPKIDATA_KEYINFO
KeyInfo
as a SPKIData
that is
used to convey information related to SPKI public-key pairs, certificates,
and other SPKI data.public static final int MGMTDATA_KEYINFO
KeyInfo
as a MgmtData
that is
used to convey in-band key distribution or agreement data.public static final String X509DATA_TYPE
X509Data
.public static final String PGPDATA_TYPE
PGPData
.public static final String SPKIDATA_TYPE
SPKIData
.public static final String MGMTDATA_TYPE
MGMTData
.public static final String X509CERTIFICATE_TYPE
KeyInfo
type as a binary X.509 certificate.Constructor Detail |
public KeyInfo()
Method Detail |
public static KeyInfo getInstance(String keyInfoName) throws XMLException
KeyInfo
object.
Parameters
keyInfoName | The keyInfo name associated with
a |
Returns
KeyInfo
object stored in the internal
hash table that contains
all the supported KeyInfo
types
that have keyInfoName as the key.Throws
XMLException
- If an error occurs while creating the
KeyInfo
object.public abstract int getKeyInfoType()
Returns
KEYVALUE_KEYINFO
or PGPDATA_KEYINFO
.public abstract String getKeyInfoName()
Returns
KeyInfo
object as
a String
public abstract org.w3c.dom.Element generateKeyInfo(org.w3c.dom.Document document, String xmlNamespace, String prefix) throws XMLException
Element
object using the contents of the
KeyInfo
object. The element will be attached to the
document.
Parameters
document | The DOM | ||
xmlNamespace | A | ||
prefix | A |
Returns
Element
object that stores all the information
for this KeyInfo
object.Throws
XMLException
- If an error occurs while generating
the keyInfo as an Element
.public abstract void parseKeyInfo(org.w3c.dom.Element keyInfoNode, String xmlNamespace) throws XMLException
Parameters
keyInfoNode | A DOM | ||
xmlNamespace | A |
Throws
XMLException
- If an error occurs while processing
the keyInfo Element
object.public abstract boolean hasKey() throws XMLException
Returns
true
if this KeyInfo
object contains a key; false
, otherwise.Throws
XMLException
- If an error occurs while checking for
a public key.public abstract boolean hasCertificate() throws XMLException
Returns
true
if this KeyInfo
object
contains certificates; false
otherwise.Throws
XMLException
- If an error occurs while checking the
availability of the certificates.public abstract Certificate[] getCertificates(CertJ certj) throws XMLException
KeyInfo
object.
Parameters
certj | A |
Returns
KeyInfo
object.Throws
XMLException
- If an error occurs in retrieving the
certificates stored in this KeyInfo
object.public abstract com.rsa.jsafe.JSAFE_PublicKey getKey() throws XMLException
Returns
JSAFE_PublicKey
object stored in this
KeyInfo
object.Throws
XMLException
- If an error occurs while retrieving
the key.public abstract void setKey(com.rsa.jsafe.JSAFE_PublicKey key) throws XMLException
KeyInfo
object to the passed-in value.
Parameters
key | A |
Throws
XMLException
- If an error occurs while setting the key.public abstract void setCertificates(Certificate[] certificates) throws XMLException
KeyInfo
object
to certificates.
Parameters
certificates | A list of |
Throws
XMLException
- If an error occurs while setting the
certificates.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |