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 voidavoidXXE(Validator validator)The method protects the validator against XXE (https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html#validator)static SchemagetSchema(List<Source> xsdSources)Returns a Schema for a list of defined xsdSourcesstatic SchemaFactorygetSecureSchemaFactory()Returns a SchemaFactory with enabled security features (disabled external DTD/XSD + secure processingstatic TransformerFactorygetSecureTransformerFactory()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 ofSources- 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
-