Skip navigation links

Oracle Fusion Middleware XML Security Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10680-05


oracle.security.xmlsec.keys
Class X509Data

java.lang.Object
  extended by oracle.security.xmlsec.util.XMLNode
      extended by oracle.security.xmlsec.util.XMLElement
          extended by oracle.security.xmlsec.keys.X509Data

All Implemented Interfaces:
KeyInfoData

public class X509Data
extends XMLElement
implements KeyInfoData

XML-DSIG X509Data element.


Nested Class Summary
static class X509Data.IssuerAndSerialNo
          Simple holder class to contain an issuer and a serial number

 

Field Summary

 

Fields inherited from class oracle.security.xmlsec.util.XMLNode
node, systemId

 

Constructor Summary
X509Data(org.w3c.dom.Element element)
          Creates a new X509Data instance from the given Element node.
X509Data(org.w3c.dom.Element element, java.lang.String systemId)
          Creates a new X509Data instance from the given Element node.

 

Method Summary
 void addCertificate(java.security.cert.X509Certificate cert)
          Adds a X.509v3 certificate as a X509Certificate element.
 void addCRL(java.security.cert.X509CRL crl)
          Adds a X.509v3 certificate revocation list as a X509CRL element.
 void addIssuerSerial(javax.security.auth.x500.X500Principal issuer, java.math.BigInteger serialNumber)
          Adds a certificate issuer and serial number as a X509IssuerSerial element.
 void addSubjectKeyID(byte[] subjectKeyID)
          Adds the value of a X.509v3 certificate subject key ID extension as a X509SKI element.
 void addSubjectName(javax.security.auth.x500.X500Principal subjectName)
          Adds a certificate subject name as a X509SubjectName element.
 java.util.Vector getCertificates()
          Returns a list of the contents of any X509Certificate elements in this X509Data.
 java.util.Vector getCRLs()
          Returns a list of the contents of any X509CRL elements in this X509Data.
 java.util.Vector getIssuerSerials()
          Returns a list of the contents of any X509IssuerSerial elements in this X509Data.
 java.util.Vector getSubjectKeyIDs()
          Returns a list of the contents of any X509SKI elements in this X509Data.
 java.util.Vector getSubjectNames()
          Returns a list of the contents of any X509SubjectName elements in this X509Data.
 java.lang.String getType()
          Returns the type URI that identifies the specific KeyInfoData subclass.
 boolean matches(java.security.cert.X509Certificate cert)
          Check if the cert matches this X509Data element

 

Methods inherited from class oracle.security.xmlsec.util.XMLElement
addNSPrefixAttr, addNSPrefixAttr, addNSPrefixAttrDefault, addNSPrefixAttrDefault, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getChildElementsByTagName, getChildElementsByTagName, getChildElementsByTagNameNS, getChildElementsByTagNameNS, getDefaultNSPrefix, getElement, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setDefaultNSPrefix

 

Methods inherited from class oracle.security.xmlsec.util.XMLNode
appendChild, appendChild, appendTo, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNode, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getSystemId, hasAttributes, hasChildNodes, insertBefore, insertBefore, isSupported, normalize, removeChild, removeChild, replaceChild, replaceChild, setNodeValue, setPrefix, setSystemId, toBytesXML, toStringXML

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

X509Data

public X509Data(org.w3c.dom.Element element)
         throws org.w3c.dom.DOMException
Creates a new X509Data instance from the given Element node.
Parameters:
element - An Element node in the XML document that conforms to the XML-DSIG X509Data schema.
Throws:
org.w3c.dom.DOMException

X509Data

public X509Data(org.w3c.dom.Element element,
                java.lang.String systemId)
         throws org.w3c.dom.DOMException
Creates a new X509Data instance from the given Element node.
Parameters:
element - An Element node in the XML document that conforms to the XML-DSIG X509Data schema.
systemId - The URI string system ID for this element.
Throws:
org.w3c.dom.DOMException
Since:
2.0
See Also:
XMLNode.setSystemId(java.lang.String)

Method Detail

addIssuerSerial

public void addIssuerSerial(javax.security.auth.x500.X500Principal issuer,
                            java.math.BigInteger serialNumber)
                     throws org.w3c.dom.DOMException
Adds a certificate issuer and serial number as a X509IssuerSerial element.
Parameters:
issuerSerial - A oracle.security.crypto.cert.IssuerAndSerialNo containing the certificate issuer's distinguished name and the certificate's serial number.
Throws:
org.w3c.dom.DOMException

getIssuerSerials

public java.util.Vector getIssuerSerials()
Returns a list of the contents of any X509IssuerSerial elements in this X509Data.
Returns:
A java.util.Vector containing oracle.security.crypto.cert.IssuerAndSerialNos.

addSubjectName

public void addSubjectName(javax.security.auth.x500.X500Principal subjectName)
                    throws org.w3c.dom.DOMException
Adds a certificate subject name as a X509SubjectName element.
Parameters:
subjectName - A oracle.security.crypto.cert.X500Name containing the certificate subject's distinguished name.
Throws:
org.w3c.dom.DOMException

getSubjectNames

public java.util.Vector getSubjectNames()
Returns a list of the contents of any X509SubjectName elements in this X509Data.
Returns:
A java.util.Vector containing oracle.security.crypto.cert.X500Names.

addSubjectKeyID

public void addSubjectKeyID(byte[] subjectKeyID)
                     throws org.w3c.dom.DOMException
Adds the value of a X.509v3 certificate subject key ID extension as a X509SKI element.
Parameters:
subjectKeyID - A byte[] containing the value of the certificate's subject key ID extension.
Throws:
org.w3c.dom.DOMException

getSubjectKeyIDs

public java.util.Vector getSubjectKeyIDs()
Returns a list of the contents of any X509SKI elements in this X509Data.
Returns:
A java.util.Vector of byte arrays containing the value of X.509v3 subject key ID extensions.

addCertificate

public void addCertificate(java.security.cert.X509Certificate cert)
                    throws org.w3c.dom.DOMException
Adds a X.509v3 certificate as a X509Certificate element.
Parameters:
cert - A oracle.security.crypto.cert.X509Certificate object.
Throws:
org.w3c.dom.DOMException

getCertificates

public java.util.Vector getCertificates()
                                 throws java.io.IOException
Returns a list of the contents of any X509Certificate elements in this X509Data.
Returns:
A java.util.Vector containing oracle.security.crypto.cert.X509Certificates.
Throws:
java.io.IOException - If a oracle.security.crypto.cert.X509Certificate cannot be instantiated from the bytes contained in a X509Certificate element.

addCRL

public void addCRL(java.security.cert.X509CRL crl)
            throws org.w3c.dom.DOMException
Adds a X.509v3 certificate revocation list as a X509CRL element.
Parameters:
crl - A oracle.security.crypto.cert.CRL object.
Throws:
org.w3c.dom.DOMException

getCRLs

public java.util.Vector getCRLs()
                         throws java.io.IOException
Returns a list of the contents of any X509CRL elements in this X509Data.
Returns:
A java.util.Vector containing oracle.security.crypto.cert.CRLs.
Throws:
java.io.IOException - If a oracle.security.crypto.cert.CRL cannot be instantiated from the bytes contained in a X509CRL element.

getType

public java.lang.String getType()
Description copied from interface: KeyInfoData
Returns the type URI that identifies the specific KeyInfoData subclass.

Interface XMLURI contains the KeyInfo data type URIs defined in the XML Signature and XML Encryption namespaces, including:

Specified by:
getType in interface KeyInfoData

matches

public boolean matches(java.security.cert.X509Certificate cert)
Check if the cert matches this X509Data element
Parameters:
cert -
Returns:

Skip navigation links

Oracle Fusion Middleware XML Security Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10680-05


Copyright © 2005, 2013 , Oracle. All rights reserved.