Package eu.europa.esig.dss.jaxb.parsers
Class XmlDefinerUtils
java.lang.Object
eu.europa.esig.dss.jaxb.parsers.XmlDefinerUtils
public final class XmlDefinerUtils extends Object
-
Constructor Summary
Constructors Constructor Description XmlDefinerUtils()
-
Method Summary
Modifier and Type Method Description static void
avoidXXE(Validator validator)
The method protects the validator against XXE (https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html#validator)static Schema
getSchema(List<Source> xsdSources)
Returns a Schema for a list of defined xsdSourcesstatic SchemaFactory
getSecureSchemaFactory()
Returns a SchemaFactory with enabled security features (disabled external DTD/XSD + secure processingstatic TransformerFactory
getSecureTransformerFactory()
Returns a TransformerFactory with enabled security features (disabled external DTD/XSD + secure processing
-
Constructor Details
-
XmlDefinerUtils
public XmlDefinerUtils()
-
-
Method Details
-
getSchema
Returns a Schema for a list of defined xsdSources- Parameters:
xsdSources
- a list ofSource
s- Returns:
Schema
- Throws:
SAXException
- in case of exception
-
getSecureSchemaFactory
Returns a SchemaFactory with enabled security features (disabled external DTD/XSD + secure processing- Returns:
SchemaFactory
- Throws:
SAXException
- in case of exception
-
getSecureTransformerFactory
public static TransformerFactory getSecureTransformerFactory() throws TransformerConfigurationExceptionReturns a TransformerFactory with enabled security features (disabled external DTD/XSD + secure processing- Returns:
TransformerFactory
- Throws:
TransformerConfigurationException
- in case of exception
-
avoidXXE
The method protects the validator against XXE (https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html#validator)- Parameters:
validator
- the validator to be configured against XXE- Throws:
SAXException
- in case of exception
-