Package org.apache.xml.security.stax.ext
Class XMLSecurityUtils
- java.lang.Object
-
- org.apache.xml.security.stax.ext.XMLSecurityUtils
-
public class XMLSecurityUtils extends Object
- Version:
- $Revision: 1764267 $ $Date: 2016-10-11 17:16:49 +0200 (Tue, 11 Oct 2016) $
- Author:
- $Author: coheigea $
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
XMLSecurityUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
copy(InputStream inputStream, OutputStream outputStream)
static void
createKeyNameTokenStructure(AbstractOutputProcessor abstractOutputProcessor, OutputProcessorChain outputProcessorChain, String keyName)
static void
createKeyValueTokenStructure(AbstractOutputProcessor abstractOutputProcessor, OutputProcessorChain outputProcessorChain, X509Certificate[] x509Certificates)
static void
createKeyValueTokenStructure(AbstractOutputProcessor abstractOutputProcessor, OutputProcessorChain outputProcessorChain, PublicKey publicKey)
static TokenSecurityEvent<? extends InboundSecurityToken>
createTokenSecurityEvent(InboundSecurityToken inboundSecurityToken, String correlationID)
static void
createX509CertificateStructure(AbstractOutputProcessor abstractOutputProcessor, OutputProcessorChain outputProcessorChain, X509Certificate[] x509Certificates)
static void
createX509IssuerSerialStructure(AbstractOutputProcessor abstractOutputProcessor, OutputProcessorChain outputProcessorChain, X509Certificate[] x509Certificates)
static void
createX509SubjectKeyIdentifierStructure(AbstractOutputProcessor abstractOutputProcessor, OutputProcessorChain outputProcessorChain, X509Certificate[] x509Certificates)
static void
createX509SubjectNameStructure(AbstractOutputProcessor abstractOutputProcessor, OutputProcessorChain outputProcessorChain, X509Certificate[] x509Certificates)
static String
dropReferenceMarker(String reference)
Returns the Id reference without the leading #static Set<String>
getExcC14NInclusiveNamespacePrefixes(XMLSecStartElement xmlSecStartElement, boolean excludeVisible)
static String
getQNameAttribute(Map<QName,String> attributes, QName qName)
static <T> T
getQNameType(List<Object> objects, QName qName)
static Transformer
getTransformer(Transformer transformer, OutputStream outputStream, Map<String,Object> properties, String algorithm, XMLSecurityConstants.DIRECTION direction)
static <T> T
getType(List<Object> objects, Class<T> clazz)
static String
getXMLEventAsString(XMLSecEvent xmlSecEvent)
Returns the XMLEvent type in String formstatic Schema
loadXMLSecuritySchemas()
static SecretKey
prepareSecretKey(String symEncAlgo, byte[] rawKey)
Convert the raw key bytes into a SecretKey object of type symEncAlgo.
-
-
-
Method Detail
-
dropReferenceMarker
public static String dropReferenceMarker(String reference)
Returns the Id reference without the leading #- Parameters:
reference
- The reference on which to drop the #- Returns:
- The reference without a leading #
-
getXMLEventAsString
public static String getXMLEventAsString(XMLSecEvent xmlSecEvent)
Returns the XMLEvent type in String form- Parameters:
xmlSecEvent
-- Returns:
- The XMLEvent type as string representation
-
getTransformer
public static Transformer getTransformer(Transformer transformer, OutputStream outputStream, Map<String,Object> properties, String algorithm, XMLSecurityConstants.DIRECTION direction) throws XMLSecurityException
- Throws:
XMLSecurityException
-
getQNameAttribute
public static String getQNameAttribute(Map<QName,String> attributes, QName qName)
-
createKeyValueTokenStructure
public static void createKeyValueTokenStructure(AbstractOutputProcessor abstractOutputProcessor, OutputProcessorChain outputProcessorChain, X509Certificate[] x509Certificates) throws XMLStreamException, XMLSecurityException
-
createKeyValueTokenStructure
public static void createKeyValueTokenStructure(AbstractOutputProcessor abstractOutputProcessor, OutputProcessorChain outputProcessorChain, PublicKey publicKey) throws XMLStreamException, XMLSecurityException
-
createX509SubjectKeyIdentifierStructure
public static void createX509SubjectKeyIdentifierStructure(AbstractOutputProcessor abstractOutputProcessor, OutputProcessorChain outputProcessorChain, X509Certificate[] x509Certificates) throws XMLSecurityException, XMLStreamException
-
createX509CertificateStructure
public static void createX509CertificateStructure(AbstractOutputProcessor abstractOutputProcessor, OutputProcessorChain outputProcessorChain, X509Certificate[] x509Certificates) throws XMLSecurityException, XMLStreamException
-
createX509SubjectNameStructure
public static void createX509SubjectNameStructure(AbstractOutputProcessor abstractOutputProcessor, OutputProcessorChain outputProcessorChain, X509Certificate[] x509Certificates) throws XMLSecurityException, XMLStreamException
-
createX509IssuerSerialStructure
public static void createX509IssuerSerialStructure(AbstractOutputProcessor abstractOutputProcessor, OutputProcessorChain outputProcessorChain, X509Certificate[] x509Certificates) throws XMLStreamException, XMLSecurityException
-
createTokenSecurityEvent
public static TokenSecurityEvent<? extends InboundSecurityToken> createTokenSecurityEvent(InboundSecurityToken inboundSecurityToken, String correlationID) throws XMLSecurityException
- Throws:
XMLSecurityException
-
getExcC14NInclusiveNamespacePrefixes
public static Set<String> getExcC14NInclusiveNamespacePrefixes(XMLSecStartElement xmlSecStartElement, boolean excludeVisible)
-
copy
public static void copy(InputStream inputStream, OutputStream outputStream) throws IOException
- Throws:
IOException
-
prepareSecretKey
public static SecretKey prepareSecretKey(String symEncAlgo, byte[] rawKey)
Convert the raw key bytes into a SecretKey object of type symEncAlgo.
-
loadXMLSecuritySchemas
public static Schema loadXMLSecuritySchemas() throws SAXException
- Throws:
SAXException
-
createKeyNameTokenStructure
public static void createKeyNameTokenStructure(AbstractOutputProcessor abstractOutputProcessor, OutputProcessorChain outputProcessorChain, String keyName) throws XMLStreamException, XMLSecurityException
-
-