Skip navigation links

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

E10680-03


oracle.security.xmlsec.dsig
Class XSKeyInfo

java.lang.Object
  extended by oracle.security.xmlsec.util.XMLNode
      extended by oracle.security.xmlsec.util.XMLElement
          extended by oracle.security.xmlsec.dsig.XSKeyInfo

All Implemented Interfaces:
Referable
Direct Known Subclasses:
OriginatorKeyInfo, RecipientKeyInfo, XEKeyInfo

public class XSKeyInfo
extends XMLElement
implements Referable

A XML-DSIG KeyInfo element that may contain one or more instances of specific KeyInfo child data elements.

See Also:
XSSignature.createKeyInfo(), KeyInfoData

Field Summary

 

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

 

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

 

Method Summary
 void addKeyInfoData(XMLElement keyInfoData)
          Adds a KeyInfoData instance to this KeyInfo.
 KeyName createKeyName(java.lang.String name)
          Creates a new KeyName element containing the given key name string in this KeyInfo's document, but does not append it to the KeyInfo element.
 KeyValue createKeyValue()
          Creates a new KeyValue element in this KeyInfo's document, but does not append it to the KeyInfo element.
 KeyValue createKeyValue(java.security.PublicKey publicKey)
          Creates a new KeyValue element containing the given public key in this KeyInfo's document, but does not append it to the KeyInfo element.
 MgmtData createMgmtData()
          Creates a new MgmtData element in this KeyInfo's document, but does not append it to the KeyInfo element.
 MgmtData createMgmtData(java.lang.String data)
          Creates a new MgmtData element containing the given data string in this KeyInfo's document, but does not append it to the KeyInfo element.
 PGPData createPGPData()
          Creates a new PGPData element in this KeyInfo's document, but does not append it to the KeyInfo element.
 RetrievalMethod createRetrievalMethod()
          Creates a new RetrievalMethod element in this KeyInfo's document, but does not append it to the KeyInfo element.
 RetrievalMethod createRetrievalMethod(java.lang.String uri, java.lang.String type)
          Creates a new RetrievalMethod element in this KeyInfo's document, but does not append it to the KeyInfo element.
 SPKIData createSPKIData()
          Creates a new SPKIData element in this KeyInfo's document, but does not append it to the KeyInfo element.
 SPKIData createSPKIData(byte[] sExp)
          Creates a new SPKIData element containing the given S-expression in this KeyInfo's document, but does not append it to the KeyInfo element.
 X509Data createX509Data()
          Creates a new X509Data element in this KeyInfo's document, but does not append it to the KeyInfo element.
 X509Data createX509Data(java.security.cert.X509Certificate cert)
          Creates a new X509Data element in this KeyInfo's document, but does not append it to the KeyInfo element.
 java.lang.String getId()
          Returns the value of the Id attribute of this KeyInfo.
 java.util.Vector getKeyInfoData()
          Returns a list of all the KeyInfoData elements contained in this XSKeyInfo.
 java.util.Vector getKeyNames()
          Returns a list of all the KeyName elements contained in this XSKeyInfo.
 java.util.Vector getKeyValues()
          Returns a list of all the KeyValue elements contained in this XSKeyInfo.
 java.util.Vector getMgmtData()
          Returns a list of all the MgmtData elements contained in this XSKeyInfo.
 java.util.Vector getPGPData()
          Returns a list of all the PGPData elements contained in this XSKeyInfo.
 java.util.Vector getRetrievalMethods()
          Returns a list of all the RetrievalMethod elements contained in this XSKeyInfo.
 java.util.Vector getSPKIData()
          Returns a list of all the SPKIData elements contained in this XSKeyInfo.
 java.lang.String getType()
          Returns null, as no type URI is defined for KeyInfo in the XML-DSIG space.
 java.util.Vector getX509Data()
          Returns a list of all the X509Data elements contained in this XSKeyInfo.
 void setId(java.lang.String id)
          Sets the Id attribute of this KeyInfo.

 

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

XSKeyInfo

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

XSKeyInfo

public XSKeyInfo(org.w3c.dom.Element element,
                 java.lang.String systemId)
          throws org.w3c.dom.DOMException
Creates a new XSKeyInfo instance from the given Element node.
Parameters:
element - An Element node in the XML document that conforms to the XML-DSIG KeyInfo 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)

XSKeyInfo

public XSKeyInfo(org.w3c.dom.Document owner)
          throws org.w3c.dom.DOMException
Creates a new XSKeyInfo instance.
Parameters:
owner - The owner document of the new XSKeyInfo.
Throws:
org.w3c.dom.DOMException

XSKeyInfo

public XSKeyInfo(org.w3c.dom.Document owner,
                 java.lang.String id)
          throws org.w3c.dom.DOMException
Creates a new XSKeyInfo instance.
Parameters:
owner - The owner document of the new XSKeyInfo.
id - An optional string ID name for this KeyInfo structure.
Throws:
org.w3c.dom.DOMException

Method Detail

createKeyName

public KeyName createKeyName(java.lang.String name)
                      throws org.w3c.dom.DOMException
Creates a new KeyName element containing the given key name string in this KeyInfo's document, but does not append it to the KeyInfo element.
Parameters:
name - A string key name.
Returns:
A new KeyName.
Throws:
org.w3c.dom.DOMException
See Also:
addKeyInfoData(oracle.security.xmlsec.util.XMLElement)

createKeyValue

public KeyValue createKeyValue()
                        throws org.w3c.dom.DOMException
Creates a new KeyValue element in this KeyInfo's document, but does not append it to the KeyInfo element.
Returns:
A new KeyValue.
Throws:
org.w3c.dom.DOMException
See Also:
addKeyInfoData(oracle.security.xmlsec.util.XMLElement)

createKeyValue

public KeyValue createKeyValue(java.security.PublicKey publicKey)
                        throws org.w3c.dom.DOMException,
                               java.security.InvalidKeyException
Creates a new KeyValue element containing the given public key in this KeyInfo's document, but does not append it to the KeyInfo element.
Parameters:
publicKey - A oracle.security.crypto.core.PublicKey.
Returns:
A new KeyValue.
Throws:
oracle.security.crypto.core.InvalidKeyException - If the given public key is not supported by the KeyValue implementation.
org.w3c.dom.DOMException
java.security.InvalidKeyException
See Also:
addKeyInfoData(oracle.security.xmlsec.util.XMLElement)

createX509Data

public X509Data createX509Data()
                        throws org.w3c.dom.DOMException
Creates a new X509Data element in this KeyInfo's document, but does not append it to the KeyInfo element.
Returns:
A new X509Data.
Throws:
org.w3c.dom.DOMException
See Also:
addKeyInfoData(oracle.security.xmlsec.util.XMLElement)

createX509Data

public X509Data createX509Data(java.security.cert.X509Certificate cert)
                        throws org.w3c.dom.DOMException
Creates a new X509Data element in this KeyInfo's document, but does not append it to the KeyInfo element.
Parameters:
cert - A oracle.security.crypto.cert.X509Certificate object. In addition to the certificate, elements are added to the X509Data containing the issuer name and serial number; the subject name; and the subject key ID if that extension is present.
Returns:
A new X509Data.
Throws:
org.w3c.dom.DOMException
See Also:
addKeyInfoData(oracle.security.xmlsec.util.XMLElement)

createMgmtData

public MgmtData createMgmtData()
                        throws org.w3c.dom.DOMException
Creates a new MgmtData element in this KeyInfo's document, but does not append it to the KeyInfo element.
Returns:
A new MgmtData.
Throws:
org.w3c.dom.DOMException
See Also:
addKeyInfoData(oracle.security.xmlsec.util.XMLElement)

createMgmtData

public MgmtData createMgmtData(java.lang.String data)
                        throws org.w3c.dom.DOMException
Creates a new MgmtData element containing the given data string in this KeyInfo's document, but does not append it to the KeyInfo element.
Parameters:
data - A data string.
Returns:
A new MgmtData.
Throws:
org.w3c.dom.DOMException
See Also:
addKeyInfoData(oracle.security.xmlsec.util.XMLElement)

createPGPData

public PGPData createPGPData()
                      throws org.w3c.dom.DOMException
Creates a new PGPData element in this KeyInfo's document, but does not append it to the KeyInfo element.
Returns:
A new PGPData.
Throws:
org.w3c.dom.DOMException
Since:
1.1
See Also:
addKeyInfoData(oracle.security.xmlsec.util.XMLElement)

createSPKIData

public SPKIData createSPKIData()
                        throws org.w3c.dom.DOMException
Creates a new SPKIData element in this KeyInfo's document, but does not append it to the KeyInfo element.
Returns:
A new SPKIData.
Throws:
org.w3c.dom.DOMException
Since:
1.1
See Also:
addKeyInfoData(oracle.security.xmlsec.util.XMLElement)

createSPKIData

public SPKIData createSPKIData(byte[] sExp)
                        throws org.w3c.dom.DOMException
Creates a new SPKIData element containing the given S-expression in this KeyInfo's document, but does not append it to the KeyInfo element.
Parameters:
sExp - The bytes of a SPKI S-expression.
Returns:
A new SPKIData.
Throws:
org.w3c.dom.DOMException
See Also:
addKeyInfoData(oracle.security.xmlsec.util.XMLElement)

createRetrievalMethod

public RetrievalMethod createRetrievalMethod()
                                      throws org.w3c.dom.DOMException
Creates a new RetrievalMethod element in this KeyInfo's document, but does not append it to the KeyInfo element.
Returns:
A new RetrievalMethod.
Throws:
org.w3c.dom.DOMException
See Also:
addKeyInfoData(oracle.security.xmlsec.util.XMLElement)

createRetrievalMethod

public RetrievalMethod createRetrievalMethod(java.lang.String uri,
                                             java.lang.String type)
                                      throws org.w3c.dom.DOMException
Creates a new RetrievalMethod element in this KeyInfo's document, but does not append it to the KeyInfo element.
Parameters:
uri - A URI identifying the KeyInfo object being referenced.
type - An optional URI identifying the type of the referenced KeyInfo object.
Returns:
A new RetrievalMethod.
Throws:
org.w3c.dom.DOMException
See Also:
addKeyInfoData(oracle.security.xmlsec.util.XMLElement)

addKeyInfoData

public void addKeyInfoData(XMLElement keyInfoData)
                    throws org.w3c.dom.DOMException
Adds a KeyInfoData instance to this KeyInfo. Instances of more than one concrete KeyInfoData subclass may be added, but all must refer to the same key material.
Parameters:
keyInfoData - A XMLElement that implements the KeyInfoData interface.
Throws:
java.lang.IllegalArgumentException - If keyInfoData does not implement the KeyInfoData interface.
org.w3c.dom.DOMException

getKeyInfoData

public java.util.Vector getKeyInfoData()
Returns a list of all the KeyInfoData elements contained in this XSKeyInfo.
Returns:
A Vector of XMLElements that implement the KeyInfoData interface.

getKeyNames

public java.util.Vector getKeyNames()
Returns a list of all the KeyName elements contained in this XSKeyInfo.
Returns:
A Vector of KeyNames.

getKeyValues

public java.util.Vector getKeyValues()
Returns a list of all the KeyValue elements contained in this XSKeyInfo.
Returns:
A Vector of KeyValues.

getX509Data

public java.util.Vector getX509Data()
Returns a list of all the X509Data elements contained in this XSKeyInfo.
Returns:
A Vector of X509Datas.

getMgmtData

public java.util.Vector getMgmtData()
Returns a list of all the MgmtData elements contained in this XSKeyInfo.
Returns:
A Vector of MgmtDatas.

getPGPData

public java.util.Vector getPGPData()
Returns a list of all the PGPData elements contained in this XSKeyInfo.
Returns:
A Vector of PGPDatas.

getSPKIData

public java.util.Vector getSPKIData()
Returns a list of all the SPKIData elements contained in this XSKeyInfo.
Returns:
A Vector of SPKIDatas.

getRetrievalMethods

public java.util.Vector getRetrievalMethods()
Returns a list of all the RetrievalMethod elements contained in this XSKeyInfo.
Returns:
A Vector of RetrievalMethods.

setId

public void setId(java.lang.String id)
           throws org.w3c.dom.DOMException
Sets the Id attribute of this KeyInfo.
Specified by:
setId in interface Referable
Parameters:
id - The ID name of this KeyInfo.
Throws:
org.w3c.dom.DOMException

getId

public java.lang.String getId()
Returns the value of the Id attribute of this KeyInfo.
Specified by:
getId in interface Referable
Returns:
A string containing the ID name of this KeyInfo, or null if the attribute is missing.

getType

public java.lang.String getType()
Returns null, as no type URI is defined for KeyInfo in the XML-DSIG space.
Specified by:
getType in interface Referable
Returns:
A URI identifying the type of this object, or null if none is defined.

Skip navigation links

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

E10680-03


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