public class X509BinarySecurityToken extends WSSBinarySecurityToken
Note: Certificate Path (#X509PKIPathv1) and Set of Certificates and CRLs (#PKCS7) Token ValueTypes are not supported in this release.
| Modifier and Type | Field and Description |
|---|---|
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.
|
DEFAULT_ENCODING_TYPE| Constructor and Description |
|---|
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. |
| Modifier and Type | Method and Description |
|---|---|
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() |
getEncodingType, getTokenName, getValue, getValueType, setValue, setValueTypegetId, getWsuId, setId, setWsuIdaddNSPrefixAttr, 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, setDefaultNSPrefixappendChild, 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, toStringXMLclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNodepublic static final java.lang.String vt_X509v1
public static final java.lang.String vt_X509v3
public static final java.lang.String vt_X509PKIPathv1
public static final java.lang.String vt_PKCS7
public X509BinarySecurityToken(org.w3c.dom.Element x509BSTElement)
X509BinarySecurityToken instance from the given XML element.x509BSTElement - A X.509 Certificate token element.
public X509BinarySecurityToken(org.w3c.dom.Element x509BSTElement,
java.lang.String systemId)
X509BinarySecurityToken instance from the given XML element.x509BSTElement - A X.509 Certificate token element.systemId - The URI string system ID for this element.public X509BinarySecurityToken(org.w3c.dom.Document owner)
X509BinarySecurityToken instance.owner - A XML Document to be used as the owner document of this structure.
public X509BinarySecurityToken(org.w3c.dom.Document owner,
java.lang.String valType,
java.lang.String encType)
X509BinarySecurityToken instance.owner - A XML Document to be used as the owner document of this structure.valType - The token value type.encType - The token encoding type.public void setToken(java.lang.Object obj)
setToken in class WSSBinarySecurityTokenobj - can be X509Certificate, PKCS7 or PKIPath objectpublic void setToken(java.security.cert.X509Certificate cert)
cert -java.security.cert.CertificateEncodingException
public void setToken(java.security.cert.CertPath certPath)
throws java.security.cert.CertificateEncodingException
certPath -java.security.cert.CertificateEncodingException
public java.lang.Object getToken()
throws WSSException
getToken in interface WSSecurityTokengetToken in class WSSBinarySecurityTokenWSSException
public java.security.cert.X509Certificate getX509Certificate()
throws WSSException
#X509v3.X509Certificate certificate or null.WSSException
public java.security.PublicKey getPublicKey()
throws WSSException
#X509v3.PublicKey certificate or null.WSSExceptionpublic boolean equals(java.security.cert.X509Certificate x509Cert)
x509Cert - The certificate token to compare.true if the X.509 encodings match or false otherwise.
public void validate()
throws WSSException,
oracle.security.xmlsec.keys.retrieval.KeyRetrievalException
WSSExceptionoracle.security.xmlsec.keys.retrieval.KeyRetrievalException