/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
# include "metadata/MetadataExt.h"
# include "security/PKIXTrustEngine.h"
# include <saml/SAMLConfig.h>
-# include <xmltooling/util/CurlNetAccessor.hpp>
#else
# include <xmltooling/XMLToolingConfig.h>
#endif
log.fatal("failed to initialize OpenSAML library");
return false;
}
- XMLPlatformUtils::fgNetAccessor = new CurlNetAccessor();
#else
if (!XMLToolingConfig::getConfig().init()) {
log.fatal("failed to initialize XMLTooling library");
log.info("%s library shutting down", PACKAGE_STRING);
setServiceProvider(NULL);
+ if (m_configDoc)
+ m_configDoc->release();
+ m_configDoc = NULL;
#ifndef SHIBSP_LITE
setArtifactResolver(NULL);
#endif
dummydoc = XMLToolingConfig::getConfig().getParser().parse(snippet);
XercesJanitor<xercesc::DOMDocument> docjanitor(dummydoc);
setServiceProvider(ServiceProviderManager.newPlugin(XML_SERVICE_PROVIDER, dummydoc->getDocumentElement()));
+ if (m_configDoc)
+ m_configDoc->release();
+ m_configDoc = docjanitor.release();
}
else {
stringstream snippet(config);
setServiceProvider(ServiceProviderManager.newPlugin(type.get(), dummydoc->getDocumentElement()));
else
throw ConfigurationException("The supplied XML bootstrapping configuration did not include a type attribute.");
+ if (m_configDoc)
+ m_configDoc->release();
+ m_configDoc = docjanitor.release();
}
getServiceProvider()->init();
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#ifndef SHIBSP_LITE
m_artifactResolver(NULL),
#endif
- m_features(0) {}
+ m_features(0), m_configDoc(NULL) {
+ }
virtual ~SPConfig() {}
private:
unsigned long m_features;
+ xercesc::DOMDocument* m_configDoc;
};
#if defined (_MSC_VER)