#include <xmltooling/util/NDC.h>
#include <xmltooling/util/ReloadableXMLFile.h>
+#include <xmltooling/validation/ValidatorSuite.h>
using namespace opensaml::saml2md;
using namespace xmltooling::logging;
"Root of metadata instance not recognized: $1", params(1,xmlObject->getElementQName().toString().c_str())
);
- // Preprocess the metadata.
+ // Preprocess the metadata (even if we schema-validated).
+ try {
+ SchemaValidators.validate(xmlObject.get());
+ }
+ catch (exception& ex) {
+ m_log.error("metadata intance failed manual validation checking: %s", ex.what());
+ throw MetadataException("Metadata instance failed manual validation checking.");
+ }
+
doFilters(*xmlObject.get());
xmlObject->releaseThisAndChildrenDOM();
xmlObject->setDocument(NULL);
EntitiesDescriptor* group=dynamic_cast<EntitiesDescriptor*>(m_object);
if (group) {
if (!m_local && group->getCacheDuration())
- exp = time_t(NULL) + group->getCacheDurationEpoch();
+ exp = time(NULL) + group->getCacheDurationEpoch();
AbstractMetadataProvider::index(group, exp);
return;
}
EntityDescriptor* site=dynamic_cast<EntityDescriptor*>(m_object);
if (!m_local && site->getCacheDuration())
- exp = time_t(NULL) + site->getCacheDurationEpoch();
+ exp = time(NULL) + site->getCacheDurationEpoch();
AbstractMetadataProvider::index(site, exp);
}