Skip navigation links

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

E10678-03


oracle.security.xmlsec.wss.x509
Class X509BinarySecurityToken

java.lang.Object
  extended by oracle.security.xmlsec.util.XMLNode
      extended by oracle.security.xmlsec.util.XMLElement
          extended by oracle.security.xmlsec.wss.WSSElement
              extended by oracle.security.xmlsec.wss.WSSBinarySecurityToken
                  extended by oracle.security.xmlsec.wss.x509.X509BinarySecurityToken

All Implemented Interfaces:
WSSecurityToken

public class X509BinarySecurityToken
extends WSSBinarySecurityToken

This class represents a WSS Binary Security Token of type X509Certificate certificate.

Note: Certificate Path (#X509PKIPathv1) and Set of Certificates and CRLs (#PKCS7) Token ValueTypes are not supported in this release.


Field Summary
static java.lang.String vt_PKCS7
          The X.509 Certificate Token ValueType URI representing a set of Certificates and CRLs.
static java.lang.String vt_X509PKIPathv1
          The X.509 Certificate Token ValueType URI representing a Certificate Path.
static java.lang.String vt_X509v1
          The X.509 Certificate Token ValueType URI representing a Single Certificate.
static java.lang.String vt_X509v3
          The X.509 Certificate Token ValueType URI representing a Single Certificate.

 

Fields inherited from class oracle.security.xmlsec.wss.WSSBinarySecurityToken
DEFAULT_ENCODING_TYPE

 

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

 

Constructor Summary
X509BinarySecurityToken(org.w3c.dom.Document owner)
          Create a new X509BinarySecurityToken instance.
X509BinarySecurityToken(org.w3c.dom.Document owner, java.lang.String valType, java.lang.String encType)
          Create a new X509BinarySecurityToken instance.
X509BinarySecurityToken(org.w3c.dom.Element x509BSTElement)
          Create a new X509BinarySecurityToken instance from the given XML element.
X509BinarySecurityToken(org.w3c.dom.Element x509BSTElement, java.lang.String systemId)
          Create a new X509BinarySecurityToken instance from the given XML element.

 

Method Summary
 boolean equals(java.security.cert.X509Certificate x509Cert)
          Checks if the X509Certificate certificate stored in this structure is the same as the given one.
 java.security.PublicKey getPublicKey()
          Returns the Public Key contained in the X.509 Certificate Token of ValueType #X509v3.
 java.lang.Object getToken()
          Get the token contents.
 java.security.cert.X509Certificate getX509Certificate()
          Returns the Public Key contained in the X.509 Certificate Token of ValueType #X509v3.
 void setToken(java.security.cert.CertPath certPath)
          Sets the tokem by calling getEncoded("PkiPath") on the certPath.
 void setToken(java.lang.Object obj)
          Set the token contents by calling getEncoded() on the object and then setValue Also changes the valueType to match the obj
 void setToken(java.security.cert.X509Certificate cert)
          Sets the token by calling getEncoded on the cert.
 void validate()
           

 

Methods inherited from class oracle.security.xmlsec.wss.WSSBinarySecurityToken
getEncodingType, getTokenName, getValue, getValueType, setValue, setValueType

 

Methods inherited from class oracle.security.xmlsec.wss.WSSElement
getId, getWsuId, setId, setWsuId

 

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

 

Methods inherited from interface oracle.security.xmlsec.wss.WSSecurityToken
getNode

 

Field Detail

vt_X509v1

public static final java.lang.String vt_X509v1
The X.509 Certificate Token ValueType URI representing a Single Certificate.
See Also:
Constant Field Values

vt_X509v3

public static final java.lang.String vt_X509v3
The X.509 Certificate Token ValueType URI representing a Single Certificate.
See Also:
Constant Field Values

vt_X509PKIPathv1

public static final java.lang.String vt_X509PKIPathv1
The X.509 Certificate Token ValueType URI representing a Certificate Path.
See Also:
Constant Field Values

vt_PKCS7

public static final java.lang.String vt_PKCS7
The X.509 Certificate Token ValueType URI representing a set of Certificates and CRLs.
See Also:
Constant Field Values

Constructor Detail

X509BinarySecurityToken

public X509BinarySecurityToken(org.w3c.dom.Element x509BSTElement)
Create a new X509BinarySecurityToken instance from the given XML element.
Parameters:
x509BSTElement - A X.509 Certificate token element.

X509BinarySecurityToken

public X509BinarySecurityToken(org.w3c.dom.Element x509BSTElement,
                               java.lang.String systemId)
Create a new X509BinarySecurityToken instance from the given XML element.
Parameters:
x509BSTElement - A X.509 Certificate token element.
systemId - The URI string system ID for this element.

X509BinarySecurityToken

public X509BinarySecurityToken(org.w3c.dom.Document owner)
Create a new X509BinarySecurityToken instance.
Parameters:
owner - A XML Document to be used as the owner document of this structure.

X509BinarySecurityToken

public X509BinarySecurityToken(org.w3c.dom.Document owner,
                               java.lang.String valType,
                               java.lang.String encType)
Create a new X509BinarySecurityToken instance.
Parameters:
owner - A XML Document to be used as the owner document of this structure.
valType - The token value type.
encType - The token encoding type.

Method Detail

setToken

public void setToken(java.lang.Object obj)
Set the token contents by calling getEncoded() on the object and then setValue Also changes the valueType to match the obj
Specified by:
setToken in class WSSBinarySecurityToken
Parameters:
obj - can be X509Certificate, PKCS7 or PKIPath object

setToken

public void setToken(java.security.cert.X509Certificate cert)
Sets the token by calling getEncoded on the cert. Also sets valueType to vt_X509v3 or vt_X509v1
Parameters:
cert -
Throws:
java.security.cert.CertificateEncodingException

setToken

public void setToken(java.security.cert.CertPath certPath)
              throws java.security.cert.CertificateEncodingException
Sets the tokem by calling getEncoded("PkiPath") on the certPath. Also sets valueType to vt_X509PKIPathv1
Parameters:
certPath -
Throws:
java.security.cert.CertificateEncodingException

getToken

public java.lang.Object getToken()
                          throws WSSException
Get the token contents.
Specified by:
getToken in interface WSSecurityToken
Specified by:
getToken in class WSSBinarySecurityToken
Returns:
The X.509 certificate, PKCS7 or PKIPath
Throws:
WSSException

getX509Certificate

public java.security.cert.X509Certificate getX509Certificate()
                                                      throws WSSException
Returns the Public Key contained in the X.509 Certificate Token of ValueType #X509v3.
Returns:
The X509Certificate certificate or null.
Throws:
WSSException

getPublicKey

public java.security.PublicKey getPublicKey()
                                     throws WSSException
Returns the Public Key contained in the X.509 Certificate Token of ValueType #X509v3.
Returns:
The PublicKey certificate or null.
Throws:
WSSException

equals

public boolean equals(java.security.cert.X509Certificate x509Cert)
Checks if the X509Certificate certificate stored in this structure is the same as the given one.
Parameters:
x509Cert - The certificate token to compare.
Returns:
true if the X.509 encodings match or false otherwise.

validate

public void validate()
              throws WSSException,
                     oracle.security.xmlsec.keys.retrieval.KeyRetrievalException
Throws:
WSSException
oracle.security.xmlsec.keys.retrieval.KeyRetrievalException

Skip navigation links

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

E10678-03


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