Adds support to SecXMLExternalEntity

This commit is contained in:
Felipe Zimmerle
2016-05-18 17:01:53 -03:00
parent 6a7b970fe3
commit f989ecd5cb
13 changed files with 215 additions and 30 deletions

View File

@@ -41,13 +41,25 @@ XML::~XML() {
bool XML::init() {
// xmlParserInputBufferCreateFilenameFunc entity;
// entity = xmlParserInputBufferCreateFilenameDefault(
// this->unloadExternalEntity);
xmlParserInputBufferCreateFilenameFunc entity;
if (m_transaction->m_rules->secXMLExternalEntity == true) {
entity = xmlParserInputBufferCreateFilenameDefault(
__xmlParserInputBufferCreateFilename);
} else {
entity = xmlParserInputBufferCreateFilenameDefault(
this->unloadExternalEntity);
}
return true;
}
xmlParserInputBufferPtr XML::unloadExternalEntity(const char *URI,
xmlCharEncoding enc) {
return NULL;
}
bool XML::processChunk(const char *buf, unsigned int size) {
/* We want to initialise our parsing context here, to
* enable us to pass it the first chunk of data so that