org.apache.ws.security.message.token
Class X509Security
java.lang.Object
org.apache.ws.security.message.token.BinarySecurity
org.apache.ws.security.message.token.X509Security
- public class X509Security
- extends BinarySecurity
X509 Security Token.
- Author:
- Davanum Srinivas (dims@yahoo.com).
Field Summary |
static java.lang.String |
X509_V3
|
Constructor Summary |
X509Security(WSSConfig wssConfig,
org.w3c.dom.Document doc)
This constructor creates a new X509 certificate element. |
X509Security(WSSConfig wssConfig,
org.w3c.dom.Element elem)
This constructor creates a new X509 certificate object and initializes
it from the data containe in the element. |
Methods inherited from class org.apache.ws.security.message.token.BinarySecurity |
getBase64EncodingValue, getElement, getEncodingType, getFirstNode, getID, getToken, getValueType, setEncodingType, setID, setToken, setValueType, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
X509_V3
public static final java.lang.String X509_V3
- See Also:
- Constant Field Values
X509Security
public X509Security(WSSConfig wssConfig,
org.w3c.dom.Element elem)
throws WSSecurityException
- This constructor creates a new X509 certificate object and initializes
it from the data containe in the element.
- Parameters:
wssConfig
- Configuration options for processing and building the wsse:Security
headerelem
- the element containing the X509 certificate data
- Throws:
WSSecurityException
X509Security
public X509Security(WSSConfig wssConfig,
org.w3c.dom.Document doc)
- This constructor creates a new X509 certificate element.
- Parameters:
doc
-
getX509Certificate
public java.security.cert.X509Certificate getX509Certificate(Crypto crypto)
throws WSSecurityException
- Gets the X509Certificate certificate.
- Returns:
- the X509 certificate converted from the base 64 encoded
element data
- Throws:
WSSecurityException
setX509Certificate
public void setX509Certificate(java.security.cert.X509Certificate cert)
throws WSSecurityException
- Sets the X509Certificate.
This functions takes the X509 certificate, gets the data from it as
encoded bytes, and sets the data as base 64 encoded data in the text
node of the element
- Parameters:
cert
- the X509 certificate to store in the element
- Throws:
WSSecurityException
getType
public static java.lang.String getType(WSSConfig wssConfig)