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: 1585383 $ $Date: 2014-04-07 06:12:12 +0100 (Mon, 07 Apr 2014) $
- Author:
- $Author: coheigea $
|
Method Summary |
static void |
copy(InputStream inputStream,
OutputStream outputStream)
|
static void |
createKeyValueTokenStructure(AbstractOutputProcessor abstractOutputProcessor,
OutputProcessorChain outputProcessorChain,
PublicKey publicKey)
|
static void |
createKeyValueTokenStructure(AbstractOutputProcessor abstractOutputProcessor,
OutputProcessorChain outputProcessorChain,
X509Certificate[] x509Certificates)
|
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
|
getQNameType(List<Object> objects,
QName qName)
|
static Transformer |
getTransformer(Transformer transformer,
OutputStream outputStream,
Map<String,Object> properties,
String algorithm,
XMLSecurityConstants.DIRECTION direction)
|
static
|
getType(List<Object> objects,
Class<T> clazz)
|
static String |
getXMLEventAsString(XMLSecEvent xmlSecEvent)
Returns the XMLEvent type in String form |
static Schema |
loadXMLSecuritySchemas()
|
static SecretKey |
prepareSecretKey(String symEncAlgo,
byte[] rawKey)
Convert the raw key bytes into a SecretKey object of type symEncAlgo. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLSecurityUtils
protected XMLSecurityUtils()
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
getType
public static <T> T getType(List<Object> objects,
Class<T> clazz)
getQNameType
public static <T> T getQNameType(List<Object> objects,
QName qName)
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
- Throws:
XMLStreamException
XMLSecurityException
createKeyValueTokenStructure
public static void createKeyValueTokenStructure(AbstractOutputProcessor abstractOutputProcessor,
OutputProcessorChain outputProcessorChain,
PublicKey publicKey)
throws XMLStreamException,
XMLSecurityException
- Throws:
XMLStreamException
XMLSecurityException
createX509SubjectKeyIdentifierStructure
public static void createX509SubjectKeyIdentifierStructure(AbstractOutputProcessor abstractOutputProcessor,
OutputProcessorChain outputProcessorChain,
X509Certificate[] x509Certificates)
throws XMLSecurityException,
XMLStreamException
- Throws:
XMLSecurityException
XMLStreamException
createX509CertificateStructure
public static void createX509CertificateStructure(AbstractOutputProcessor abstractOutputProcessor,
OutputProcessorChain outputProcessorChain,
X509Certificate[] x509Certificates)
throws XMLSecurityException,
XMLStreamException
- Throws:
XMLSecurityException
XMLStreamException
createX509SubjectNameStructure
public static void createX509SubjectNameStructure(AbstractOutputProcessor abstractOutputProcessor,
OutputProcessorChain outputProcessorChain,
X509Certificate[] x509Certificates)
throws XMLSecurityException,
XMLStreamException
- Throws:
XMLSecurityException
XMLStreamException
createX509IssuerSerialStructure
public static void createX509IssuerSerialStructure(AbstractOutputProcessor abstractOutputProcessor,
OutputProcessorChain outputProcessorChain,
X509Certificate[] x509Certificates)
throws XMLStreamException,
XMLSecurityException
- 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
Copyright © 2000–2014 The Apache Software Foundation. All rights reserved.