Package org.apache.wss4j.common.token
Class X509Security
java.lang.Object
org.apache.wss4j.common.token.BinarySecurity
org.apache.wss4j.common.token.X509Security
X509 Security Token.
-
Field Summary
FieldsFields inherited from class org.apache.wss4j.common.token.BinarySecurity
TOKEN_BST, TOKEN_KI -
Constructor Summary
ConstructorsConstructorDescriptionX509Security(Document doc) This constructor creates a new X509 certificate element.X509Security(Element elem, BSPEnforcer bspEnforcer) This constructor creates a new X509 certificate object and initializes it from the data contained in the element. -
Method Summary
Modifier and TypeMethodDescriptiongetX509Certificate(Crypto crypto) Gets the X509Certificate certificate.voidSets the X509Certificate.Methods inherited from class org.apache.wss4j.common.token.BinarySecurity
addWSSENamespace, addWSUNamespace, encodeRawToken, equals, getAttachmentCallbackHandler, getElement, getEncodingType, getID, getToken, getValueType, hashCode, isStoreBytesInAttachment, setAttachmentCallbackHandler, setEncodingType, setID, setRawToken, setStoreBytesInAttachment, setToken, setValueType, toString
-
Field Details
-
X509_V3_TYPE
- See Also:
-
-
Constructor Details
-
X509Security
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 databspEnforcer- a BSPEnforcer instance to enforce BSP rules- Throws:
WSSecurityException
-
X509Security
This constructor creates a new X509 certificate element.- Parameters:
doc-
-
-
Method Details
-
getX509Certificate
Gets the X509Certificate certificate.- Returns:
- the X509 certificate converted from the base 64 encoded element data
- Throws:
WSSecurityException
-
setX509Certificate
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
-