|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.xml.KeyInfo | +--com.rsa.certj.xml.X509Data
This class stores one or more identifiers of X.509 certificates
such as subject name, issuer serial number, and so on, that can be
useful for validation. These identifiers map to
the same certificate. There are five types of X509Data:
X509IssuerSerial
,
X509SubjectName
, X509SKI
,
X509Certificate
, and X509CRL
.
X509Certificate
element should be in X957
format.
Copyright © RSA Security Inc., 2001-2002. All rights reserved.
See Also
Fields inherited from class com.rsa.certj.xml.KeyInfo |
KEYNAME_KEYINFO, KEYVALUE_KEYINFO, MGMTDATA_KEYINFO, MGMTDATA_TYPE, PGPDATA_KEYINFO, PGPDATA_TYPE, RETRIEVALMETHOD_KEYINFO, SPKIDATA_KEYINFO, SPKIDATA_TYPE, X509CERTIFICATE_TYPE, X509DATA_KEYINFO, X509DATA_TYPE |
Constructor Summary |
|
X509Data()
Creates an empty |
|
X509Data(X500Name issuerName,
byte[] serialNum,
X500Name subjectName,
SubjectKeyID subjectKeyID,
X509Certificate[] certificates,
X509CRL crl)
Creates an |
Method Summary |
|
clone()
Overrides the default |
|
org.w3c.dom.Element |
generateKeyInfo(org.w3c.dom.Document document,
String xmlNamespace,
String prefix)
This method takes the contents of this |
getCertificates(CertJ certj)
Returns the certificates stored in this |
|
com.rsa.jsafe.JSAFE_PublicKey |
getKey()
Returns the public key stored in this |
getKeyInfoName()
Returns the |
|
int |
getKeyInfoType()
Returns the |
byte[] |
getSerialNum()
Returns the serial number of this |
getX509CRL()
Returns the X.509 v3 certificate revocation list (CRL). |
|
getX509IssuerName()
Returns the X.509 issuer distinguished name
of this |
|
getX509SKI()
Returns the subject-key identifier value of
this |
|
getX509SubjectName()
Returns the X.509 subject name of this
|
|
boolean |
hasCertificate()
Returns |
boolean |
hasKey()
Determines whether the |
void |
parseKeyInfo(org.w3c.dom.Element keyInfoNode,
String xmlNamespace)
This method processes the keyInfoNode and retrieves the certificates, or related information such as subject name. |
void |
setCertificates(Certificate[] certificates)
Sets the certificates of this |
void |
setKey(com.rsa.jsafe.JSAFE_PublicKey key)
Sets the key of this |
void |
setX509CRL(X509CRL crl)
Sets the |
void |
setX509IssuerSerial(X500Name issuerName,
byte[] serialNum)
Sets the issuer name and serial number
of this |
void |
setX509SKI(SubjectKeyID subjectKeyID)
Sets the subjectKeyID of this |
void |
setX509SubjectName(X500Name subjectName)
Sets the X.509 subject distinguished name. |
Methods inherited from class com.rsa.certj.xml.KeyInfo |
getInstance |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public X509Data()
X509Data
object.public X509Data(X500Name issuerName, byte[] serialNum, X500Name subjectName, SubjectKeyID subjectKeyID, X509Certificate[] certificates, X509CRL crl)
X509Data
object and initializes it with
the given values.
Parameters
issuerName | An | ||
serialNum | The serial number of the certificate specified by issuerName. | ||
subjectName | An | ||
subjectKeyID | A | ||
certificates | An | ||
crl | An |
Method Detail |
public int getKeyInfoType()
KeyInfo
type,
which is always the type X509Data
.
Overrides
getKeyInfoType
in class KeyInfo
Returns
KeyInfo
type as an integer. This method
always returns X509DATA_KEYINFO
.public String getKeyInfoName()
KeyInfo
name, which is
always "X509Data
".
Overrides
getKeyInfoName
in class KeyInfo
Returns
KeyInfo
name of this
KeyInfo
object as the
String
"X509Data
".public org.w3c.dom.Element generateKeyInfo(org.w3c.dom.Document document, String xmlNamespace, String prefix) throws XMLException
KeyInfo
and creates
a DOM Element
object. This element will be attached to
document.
Overrides
generateKeyInfo
in class KeyInfo
Parameters
document | A DOM | ||
xmlNamespace | A | ||
prefix | A |
Returns
Element
object that stores all the information
of this KeyInfo
.Throws
XMLException
- If an error occured while generating
the KeyInfo
as an Element
.public void parseKeyInfo(org.w3c.dom.Element keyInfoNode, String xmlNamespace) throws XMLException
Overrides
parseKeyInfo
in class KeyInfo
Parameters
keyInfoNode | A DOM | ||
xmlNamespace | A |
Throws
XMLException
- If an error occured while processing
the keyInfo Element
.public void setX509SubjectName(X500Name subjectName)
Parameters
subjectName | An |
public void setX509IssuerSerial(X500Name issuerName, byte[] serialNum)
X509Data
object by assigning
them to issuerName and serialNum.
Parameters
issuerName | An | ||
serialNum | The serial number of the certificate specified by issuerName. |
public void setX509SKI(SubjectKeyID subjectKeyID)
X509Data
object.
Parameters
subjectKeyID | A |
public void setX509CRL(X509CRL crl)
X509CRL
attribute of this X509Data
object. It is used for certificate validation.
Parameters
crl | An |
public void setKey(com.rsa.jsafe.JSAFE_PublicKey key) throws XMLException
X509Data
object to
key. Because X509Data
does
not store a key
directly, do not call this method on an
X509Data
object.
Overrides
setKey
in class KeyInfo
Parameters
key | A |
Throws
XMLException
- Always throws an XMLException
,
because X509Data
does not store a key directly.public void setCertificates(Certificate[] certificates)
X509Data
object
to certificates.
If the verification side uses an IBM toolkit,
the DSA certificates stored in the
X509Certificate
element should be
in X957 format.
Overrides
setCertificates
in class KeyInfo
Parameters
certificates | A |
public Certificate[] getCertificates(CertJ certj) throws XMLException
keyInfo
object.
The subject name,
issuer serial, and subject-key identifier grouped in this
X509Data
object should map to the same certificate.
Overrides
getCertificates
in class KeyInfo
Parameters
certj | A |
Returns
KeyInfo
object.Throws
XMLException
- If an error occured in retrieving the
certificates stored in this KeyInfo
object.public X509CRL getX509CRL()
Returns
X509CRL
data stored
in this X509Data
object.public SubjectKeyID getX509SKI()
X509Data
object, if
there is one.
Returns
SubjectKeyID
data stored
in this X509Data
object.public X500Name getX509SubjectName()
X509Data
object, if there is one.
Returns
X509Data
object as an X500Name
.public X500Name getX509IssuerName()
X509Data
object, if
there is one.
Returns
issuerName
of this X509Data
object
as an X500Name
.public byte[] getSerialNum()
X509Data
object, if there is one.
Returns
byte
array.public boolean hasKey()
KeyInfo
to which this
X509Data
refers contains a
public key.
Overrides
hasKey
in class KeyInfo
Returns
true
if this KeyInfo
object contains a key; false
, otherwise.
Because X509Data
does not store a key directly,
this method always returns false
.public com.rsa.jsafe.JSAFE_PublicKey getKey()
KeyInfo
object.
Overrides
getKey
in class KeyInfo
Returns
JSAFE_PublicKey
object
stored in this X509Data
object.
Because X509Data
objects do not store
key information directly,
this method always returns null
.public boolean hasCertificate()
true
if this KeyInfo
object contains certificates;
returns false
otherwise.
Overrides
hasCertificate
in class KeyInfo
Returns
true
if this KeyInfo
object contains certificates or other information for retrieving certificates
from the database; false
, otherwise.public Object clone() throws CloneNotSupportedException
clone
method to get a deeper clone.
Returns
X509Data
object,
a copy of this object.Throws
CloneNotSupportedException
- If the cloning operation
is not successful.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |