org.apache.ws.security.message.token
Class X509Security

java.lang.Object
  extended by org.apache.ws.security.message.token.BinarySecurity
      extended by org.apache.ws.security.message.token.X509Security

public class X509Security
extends BinarySecurity

X509 Security Token.

Author:
Davanum Srinivas ([email protected]).

Field Summary
static java.lang.String X509_V3_TYPE
           
 
Fields inherited from class org.apache.ws.security.message.token.BinarySecurity
BASE64_ENCODING, element, TOKEN_BST, TOKEN_KI
 
Constructor Summary
X509Security(org.w3c.dom.Document doc)
          This constructor creates a new X509 certificate element.
X509Security(org.w3c.dom.Element elem)
          This constructor creates a new X509 certificate object and initializes it from the data contained in the element.
X509Security(org.w3c.dom.Element elem, boolean bspCompliant)
          This constructor creates a new X509 certificate object and initializes it from the data contained in the element.
 
Method Summary
 java.security.cert.X509Certificate getX509Certificate(Crypto crypto)
          Gets the X509Certificate certificate.
 void setX509Certificate(java.security.cert.X509Certificate cert)
          Sets the X509Certificate.
 
Methods inherited from class org.apache.ws.security.message.token.BinarySecurity
addWSSENamespace, addWSUNamespace, equals, getElement, getEncodingType, getFirstNode, getID, getToken, getValueType, hashCode, setEncodingType, setID, setToken, setValueType, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

X509_V3_TYPE

public static final java.lang.String X509_V3_TYPE
See Also:
Constant Field Values
Constructor Detail

X509Security

public X509Security(org.w3c.dom.Element elem)
             throws WSSecurityException
This constructor creates a new X509 certificate object and initializes it from the data contained in the element.

Parameters:
elem - the element containing the X509 certificate data
Throws:
WSSecurityException

X509Security

public X509Security(org.w3c.dom.Element elem,
                    boolean bspCompliant)
             throws WSSecurityException
This constructor creates a new X509 certificate object and initializes it from the data contained in the element.

Parameters:
elem - the element containing the X509 certificate data
bspCompliant - Whether the token is processed according to the BSP spec
Throws:
WSSecurityException

X509Security

public X509Security(org.w3c.dom.Document doc)
This constructor creates a new X509 certificate element.

Parameters:
doc -
Method Detail

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


Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.