[cpp-xmltooling] branch master updated: SSPCPP-778 - Fork configuration and address backward compatibility
Scott Cantor
cantor.2 at osu.edu
Thu Jun 7 19:55:52 EDT 2018
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository cpp-xmltooling.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-xmltooling.git;a=commit;h=8cc96b3de8feb4acb75f21bc8c90af22bd6a5169
The following commit(s) were added to refs/heads/master by this push:
new 8cc96b3 SSPCPP-778 - Fork configuration and address backward compatibility
8cc96b3 is described below
commit 8cc96b3de8feb4acb75f21bc8c90af22bd6a5169
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Jun 7 19:54:20 2018 -0400
SSPCPP-778 - Fork configuration and address backward compatibility
https://issues.shibboleth.net/jira/browse/SSPCPP-778
Extend plugin APIs to allow deprecated settings to be disabled.
---
xmltooling/PluginManager.h | 8 ++--
xmltooling/XMLToolingConfig.cpp | 4 +-
xmltooling/XMLToolingConfig.h | 6 ++-
xmltooling/impl/MemoryStorageService.cpp | 2 +-
xmltooling/internal.h | 2 +-
xmltooling/security/AbstractPKIXTrustEngine.h | 3 +-
xmltooling/security/ChainingTrustEngine.h | 3 +-
xmltooling/security/OpenSSLTrustEngine.h | 3 +-
xmltooling/security/SignatureTrustEngine.h | 3 +-
xmltooling/security/TrustEngine.h | 3 +-
xmltooling/security/X509TrustEngine.h | 3 +-
.../security/impl/AbstractPKIXTrustEngine.cpp | 8 ++--
.../security/impl/ChainingCredentialResolver.cpp | 10 ++---
xmltooling/security/impl/ChainingTrustEngine.cpp | 10 ++---
.../security/impl/DummyCredentialResolver.cpp | 2 +-
.../security/impl/ExplicitKeyTrustEngine.cpp | 2 +-
.../security/impl/FilesystemCredentialResolver.cpp | 14 +++++--
xmltooling/security/impl/InlineKeyResolver.cpp | 2 +-
xmltooling/security/impl/ManagedResource.h | 6 +--
xmltooling/security/impl/PKIXPathValidator.cpp | 10 +++--
.../security/impl/StaticDataSealerKeyStrategy.cpp | 2 +-
xmltooling/security/impl/StaticPKIXTrustEngine.cpp | 14 +++----
xmltooling/security/impl/TrustEngine.cpp | 10 ++---
.../impl/VersionedDataSealerKeyStrategy.cpp | 12 +++---
xmltooling/soap/impl/CURLSOAPTransport.cpp | 2 +-
xmltooling/soap/impl/SOAPClient.cpp | 2 +-
xmltooling/util/ReloadableXMLFile.cpp | 49 ++++++++++++++--------
xmltooling/util/ReloadableXMLFile.h | 13 +++---
xmltooling/util/ReplayCache.cpp | 2 +-
xmltoolingtest/DataSealerTest.h | 4 +-
xmltoolingtest/EncryptionTest.h | 2 +-
xmltoolingtest/ExplicitKeyTrustEngineTest.h | 4 +-
xmltoolingtest/FilesystemCredentialResolverTest.h | 2 +-
xmltoolingtest/InlineKeyResolverTest.h | 8 ++--
xmltoolingtest/MemoryStorageServiceTest.h | 2 +-
xmltoolingtest/PKIXEngineTest.h | 6 +--
xmltoolingtest/SecurityHelperTest.h | 2 +-
xmltoolingtest/SignatureTest.h | 2 +-
38 files changed, 139 insertions(+), 103 deletions(-)
diff --git a/xmltooling/PluginManager.h b/xmltooling/PluginManager.h
index a8a9e43..0191ee2 100644
--- a/xmltooling/PluginManager.h
+++ b/xmltooling/PluginManager.h
@@ -55,7 +55,7 @@ namespace xmltooling {
~PluginManager() {}
/** Factory function for plugin. */
- typedef T* Factory(const Params&);
+ typedef T* Factory(const Params&, bool deprecationSupport);
/**
* Registers the factory for a given type.
@@ -90,13 +90,15 @@ namespace xmltooling {
*
* @param type the key to the plugin type
* @param p parameters to configure plugin
+ * @param deprecationSupport true iff the plugin should recognize/support its deprecated features
+ *
* @return the constructed plugin
*/
- T* newPlugin(const Key& type, const Params& p) const {
+ T* newPlugin(const Key& type, const Params& p, bool deprecationSupport) const {
typename std::map<Key, typename PluginManager::Factory*>::const_iterator i=m_map.find(type);
if (i==m_map.end())
throw UnknownExtensionException("Unknown plugin type.");
- return i->second(p);
+ return i->second(p, deprecationSupport);
}
private:
diff --git a/xmltooling/XMLToolingConfig.cpp b/xmltooling/XMLToolingConfig.cpp
index 5d7b799..4bd5b11 100644
--- a/xmltooling/XMLToolingConfig.cpp
+++ b/xmltooling/XMLToolingConfig.cpp
@@ -352,7 +352,7 @@ bool XMLToolingInternalConfig::log_config(const char* config)
return true;
}
-bool XMLToolingInternalConfig::init()
+bool XMLToolingInternalConfig::init(bool deprecationSupport)
{
#ifdef _DEBUG
xmltooling::NDC ndc("init");
@@ -436,7 +436,7 @@ bool XMLToolingInternalConfig::init()
registerPathValidators();
registerTrustEngines();
registerXMLAlgorithms();
- m_keyInfoResolver.reset(KeyInfoResolverManager.newPlugin(INLINE_KEYINFO_RESOLVER,nullptr));
+ m_keyInfoResolver.reset(KeyInfoResolverManager.newPlugin(INLINE_KEYINFO_RESOLVER,nullptr,deprecationSupport));
#endif
#ifndef XMLTOOLING_LITE
diff --git a/xmltooling/XMLToolingConfig.h b/xmltooling/XMLToolingConfig.h
index 5b8c292..886f729 100644
--- a/xmltooling/XMLToolingConfig.h
+++ b/xmltooling/XMLToolingConfig.h
@@ -110,10 +110,12 @@ namespace xmltooling {
*
* Each process using the library MUST call this function exactly once
* before using any library classes except for the LogConfig method.
- *
+ *
+ * @param deprecationSupport true iff plugins should support any deprecated features
+ *
* @return true iff initialization was successful
*/
- virtual bool init()=0;
+ virtual bool init(bool deprecationSupport=true)=0;
/**
* Shuts down library
diff --git a/xmltooling/impl/MemoryStorageService.cpp b/xmltooling/impl/MemoryStorageService.cpp
index e92f59c..0e33c69 100644
--- a/xmltooling/impl/MemoryStorageService.cpp
+++ b/xmltooling/impl/MemoryStorageService.cpp
@@ -126,7 +126,7 @@ namespace xmltooling {
Category& m_log;
};
- StorageService* XMLTOOL_DLLLOCAL MemoryStorageServiceFactory(const DOMElement* const & e)
+ StorageService* XMLTOOL_DLLLOCAL MemoryStorageServiceFactory(const DOMElement* const & e, bool deprecationSupport)
{
return new MemoryStorageService(e);
}
diff --git a/xmltooling/internal.h b/xmltooling/internal.h
index dce3a0c..91814cd 100644
--- a/xmltooling/internal.h
+++ b/xmltooling/internal.h
@@ -95,7 +95,7 @@ namespace xmltooling {
static XMLToolingInternalConfig& getInternalConfig();
// global per-process setup and shutdown of runtime
- bool init();
+ bool init(bool deprecationSupport=true);
void term();
// global mutex available to library applications
diff --git a/xmltooling/security/AbstractPKIXTrustEngine.h b/xmltooling/security/AbstractPKIXTrustEngine.h
index 0ba1cc1..e1e6f3b 100644
--- a/xmltooling/security/AbstractPKIXTrustEngine.h
+++ b/xmltooling/security/AbstractPKIXTrustEngine.h
@@ -63,8 +63,9 @@ namespace xmltooling {
* </ul>
*
* @param e DOM to supply configuration for provider
+ * @param deprecationSupport true iff deprecated features and settings should be supported
*/
- AbstractPKIXTrustEngine(const xercesc::DOMElement* e=nullptr);
+ AbstractPKIXTrustEngine(const xercesc::DOMElement* e=nullptr, bool deprecationSupport=true);
/** Plugins used to perform path validation. */
std::vector< boost::shared_ptr<OpenSSLPathValidator> > m_pathValidators;
diff --git a/xmltooling/security/ChainingTrustEngine.h b/xmltooling/security/ChainingTrustEngine.h
index a48decb..7fca131 100644
--- a/xmltooling/security/ChainingTrustEngine.h
+++ b/xmltooling/security/ChainingTrustEngine.h
@@ -51,8 +51,9 @@ namespace xmltooling {
* XML namespaces are ignored in the processing of this content.
*
* @param e DOM to supply configuration for provider
+ * @param deprecationSupport true iff the plugin(s) should support any deprecated features
*/
- ChainingTrustEngine(const xercesc::DOMElement* e=nullptr);
+ ChainingTrustEngine(const xercesc::DOMElement* e=nullptr, bool deprecationSupport=true);
/**
* Destructor will delete any embedded engines.
diff --git a/xmltooling/security/OpenSSLTrustEngine.h b/xmltooling/security/OpenSSLTrustEngine.h
index aae00ee..57e703a 100644
--- a/xmltooling/security/OpenSSLTrustEngine.h
+++ b/xmltooling/security/OpenSSLTrustEngine.h
@@ -44,8 +44,9 @@ namespace xmltooling {
* Constructor.
*
* @param e DOM to supply configuration for provider
+ * @param deprecationSupport true iff deprecated features and settings should be supported
*/
- OpenSSLTrustEngine(const xercesc::DOMElement* e=nullptr);
+ OpenSSLTrustEngine(const xercesc::DOMElement* e=nullptr, bool deprecationSupport=true);
public:
virtual ~OpenSSLTrustEngine();
diff --git a/xmltooling/security/SignatureTrustEngine.h b/xmltooling/security/SignatureTrustEngine.h
index 71ee2bc..424a375 100644
--- a/xmltooling/security/SignatureTrustEngine.h
+++ b/xmltooling/security/SignatureTrustEngine.h
@@ -48,8 +48,9 @@ namespace xmltooling {
* Constructor.
*
* @param e DOM to supply configuration for provider
+ * @param deprecationSupport true iff deprecated features and settings should be supported
*/
- SignatureTrustEngine(const xercesc::DOMElement* e=nullptr);
+ SignatureTrustEngine(const xercesc::DOMElement* e=nullptr, bool deprecationSupport=true);
public:
virtual ~SignatureTrustEngine();
diff --git a/xmltooling/security/TrustEngine.h b/xmltooling/security/TrustEngine.h
index c397441..9bc490f 100644
--- a/xmltooling/security/TrustEngine.h
+++ b/xmltooling/security/TrustEngine.h
@@ -54,8 +54,9 @@ namespace xmltooling {
* XML namespaces are ignored in the processing of this content.
*
* @param e DOM to supply configuration for provider
+ * @param deprecationSupport true iff deprecated settings and features should be supported
*/
- TrustEngine(const xercesc::DOMElement* e=nullptr);
+ TrustEngine(const xercesc::DOMElement* e=nullptr, bool deprecationSupport=true);
/** Custom KeyInfoResolver instance. */
KeyInfoResolver* m_keyInfoResolver;
diff --git a/xmltooling/security/X509TrustEngine.h b/xmltooling/security/X509TrustEngine.h
index f386602..76fae92 100644
--- a/xmltooling/security/X509TrustEngine.h
+++ b/xmltooling/security/X509TrustEngine.h
@@ -47,8 +47,9 @@ namespace xmltooling {
* Constructor.
*
* @param e DOM to supply configuration for provider
+ * @param deprecationSupport true iff deprecated features and settings should be supported
*/
- X509TrustEngine(const xercesc::DOMElement* e=nullptr);
+ X509TrustEngine(const xercesc::DOMElement* e=nullptr, bool deprecationSupport=true);
public:
virtual ~X509TrustEngine();
diff --git a/xmltooling/security/impl/AbstractPKIXTrustEngine.cpp b/xmltooling/security/impl/AbstractPKIXTrustEngine.cpp
index d10c21c..984eafa 100644
--- a/xmltooling/security/impl/AbstractPKIXTrustEngine.cpp
+++ b/xmltooling/security/impl/AbstractPKIXTrustEngine.cpp
@@ -121,8 +121,8 @@ AbstractPKIXTrustEngine::PKIXValidationInfoIterator::~PKIXValidationInfoIterator
{
}
-AbstractPKIXTrustEngine::AbstractPKIXTrustEngine(const xercesc::DOMElement* e)
- : TrustEngine(e),
+AbstractPKIXTrustEngine::AbstractPKIXTrustEngine(const xercesc::DOMElement* e, bool deprecationSupport)
+ : TrustEngine(e, deprecationSupport),
m_checkRevocation(XMLHelper::getAttrString(e, nullptr, checkRevocation)),
m_policyMappingInhibit(XMLHelper::getAttrBool(e, false, policyMappingInhibit)),
m_anyPolicyInhibit(XMLHelper::getAttrBool(e, false, anyPolicyInhibit))
@@ -152,7 +152,7 @@ AbstractPKIXTrustEngine::AbstractPKIXTrustEngine(const xercesc::DOMElement* e)
Category::getInstance(XMLTOOLING_LOGCAT ".TrustEngine.PKIX").info(
"building PathValidator of type %s", t.c_str()
);
- PathValidator* pv = XMLToolingConfig::getConfig().PathValidatorManager.newPlugin(t.c_str(), c);
+ PathValidator* pv = XMLToolingConfig::getConfig().PathValidatorManager.newPlugin(t.c_str(), c, deprecationSupport);
OpenSSLPathValidator* ospv = dynamic_cast<OpenSSLPathValidator*>(pv);
if (!ospv) {
delete pv;
@@ -174,7 +174,7 @@ AbstractPKIXTrustEngine::AbstractPKIXTrustEngine(const xercesc::DOMElement* e)
if (m_pathValidators.empty()) {
boost::shared_ptr<OpenSSLPathValidator> ptr(
dynamic_cast<OpenSSLPathValidator*>(
- XMLToolingConfig::getConfig().PathValidatorManager.newPlugin(PKIX_PATHVALIDATOR, e)
+ XMLToolingConfig::getConfig().PathValidatorManager.newPlugin(PKIX_PATHVALIDATOR, e, deprecationSupport)
)
);
m_pathValidators.push_back(ptr);
diff --git a/xmltooling/security/impl/ChainingCredentialResolver.cpp b/xmltooling/security/impl/ChainingCredentialResolver.cpp
index ae3d2ae..4222f7e 100644
--- a/xmltooling/security/impl/ChainingCredentialResolver.cpp
+++ b/xmltooling/security/impl/ChainingCredentialResolver.cpp
@@ -48,7 +48,7 @@ namespace xmltooling {
class XMLTOOL_DLLLOCAL ChainingCredentialResolver : public CredentialResolver
{
public:
- ChainingCredentialResolver(const DOMElement* e);
+ ChainingCredentialResolver(const DOMElement* e, bool deprecationSupport=true);
virtual ~ChainingCredentialResolver() {}
Lockable* lock() {
@@ -83,16 +83,16 @@ namespace xmltooling {
ptr_vector<CredentialResolver> m_resolvers;
};
- CredentialResolver* XMLTOOL_DLLLOCAL ChainingCredentialResolverFactory(const DOMElement* const & e)
+ CredentialResolver* XMLTOOL_DLLLOCAL ChainingCredentialResolverFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new ChainingCredentialResolver(e);
+ return new ChainingCredentialResolver(e, deprecationSupport);
}
static const XMLCh _CredentialResolver[] = UNICODE_LITERAL_18(C,r,e,d,e,n,t,i,a,l,R,e,s,o,l,v,e,r);
static const XMLCh type[] = UNICODE_LITERAL_4(t,y,p,e);
};
-ChainingCredentialResolver::ChainingCredentialResolver(const DOMElement* e)
+ChainingCredentialResolver::ChainingCredentialResolver(const DOMElement* e, bool deprecationSupport)
{
XMLToolingConfig& conf = XMLToolingConfig::getConfig();
Category& log=Category::getInstance(XMLTOOLING_LOGCAT ".CredentialResolver." CHAINING_CREDENTIAL_RESOLVER);
@@ -104,7 +104,7 @@ ChainingCredentialResolver::ChainingCredentialResolver(const DOMElement* e)
if (!t.empty()) {
log.info("building CredentialResolver of type %s", t.c_str());
try {
- m_resolvers.push_back(conf.CredentialResolverManager.newPlugin(t.c_str(), e));
+ m_resolvers.push_back(conf.CredentialResolverManager.newPlugin(t.c_str(), e, deprecationSupport));
}
catch (exception& ex) {
log.error("caught exception processing embedded CredentialResolver element: %s", ex.what());
diff --git a/xmltooling/security/impl/ChainingTrustEngine.cpp b/xmltooling/security/impl/ChainingTrustEngine.cpp
index fbde4a5..4baafed 100644
--- a/xmltooling/security/impl/ChainingTrustEngine.cpp
+++ b/xmltooling/security/impl/ChainingTrustEngine.cpp
@@ -45,16 +45,16 @@ using namespace std;
using xercesc::DOMElement;
namespace xmltooling {
- TrustEngine* XMLTOOL_DLLLOCAL ChainingTrustEngineFactory(const DOMElement* const & e)
+ TrustEngine* XMLTOOL_DLLLOCAL ChainingTrustEngineFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new ChainingTrustEngine(e);
+ return new ChainingTrustEngine(e, deprecationSupport);
}
};
static const XMLCh _TrustEngine[] = UNICODE_LITERAL_11(T,r,u,s,t,E,n,g,i,n,e);
static const XMLCh _type[] = UNICODE_LITERAL_4(t,y,p,e);
-ChainingTrustEngine::ChainingTrustEngine(const DOMElement* e) : TrustEngine(e)
+ChainingTrustEngine::ChainingTrustEngine(const DOMElement* e, bool deprecationSupport) : TrustEngine(e)
{
Category& log=Category::getInstance(XMLTOOLING_LOGCAT ".TrustEngine." CHAINING_TRUSTENGINE);
e = e ? XMLHelper::getFirstChildElement(e, _TrustEngine) : nullptr;
@@ -63,10 +63,10 @@ ChainingTrustEngine::ChainingTrustEngine(const DOMElement* e) : TrustEngine(e)
string t = XMLHelper::getAttrString(e, nullptr, _type);
if (!t.empty()) {
log.info("building TrustEngine of type %s", t.c_str());
- addTrustEngine(XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(t.c_str(), e));
+ addTrustEngine(XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(t.c_str(), e, deprecationSupport));
}
}
- catch (exception& ex) {
+ catch (const exception& ex) {
log.error("error building TrustEngine: %s", ex.what());
}
e = XMLHelper::getNextSiblingElement(e, _TrustEngine);
diff --git a/xmltooling/security/impl/DummyCredentialResolver.cpp b/xmltooling/security/impl/DummyCredentialResolver.cpp
index 8ce16bb..c2de7c1 100644
--- a/xmltooling/security/impl/DummyCredentialResolver.cpp
+++ b/xmltooling/security/impl/DummyCredentialResolver.cpp
@@ -55,7 +55,7 @@ namespace xmltooling {
}
};
- CredentialResolver* XMLTOOL_DLLLOCAL DummyCredentialResolverFactory(const DOMElement* const & e)
+ CredentialResolver* XMLTOOL_DLLLOCAL DummyCredentialResolverFactory(const DOMElement* const & e, bool deprecationSupport)
{
return new DummyCredentialResolver(e);
}
diff --git a/xmltooling/security/impl/ExplicitKeyTrustEngine.cpp b/xmltooling/security/impl/ExplicitKeyTrustEngine.cpp
index 936bc10..e050caa 100644
--- a/xmltooling/security/impl/ExplicitKeyTrustEngine.cpp
+++ b/xmltooling/security/impl/ExplicitKeyTrustEngine.cpp
@@ -89,7 +89,7 @@ namespace xmltooling {
) const;
};
- TrustEngine* XMLTOOL_DLLLOCAL ExplicitKeyTrustEngineFactory(const DOMElement* const & e)
+ TrustEngine* XMLTOOL_DLLLOCAL ExplicitKeyTrustEngineFactory(const DOMElement* const & e, bool deprecationSupport)
{
return new ExplicitKeyTrustEngine(e);
}
diff --git a/xmltooling/security/impl/FilesystemCredentialResolver.cpp b/xmltooling/security/impl/FilesystemCredentialResolver.cpp
index 1f408a2..94e7aa4 100644
--- a/xmltooling/security/impl/FilesystemCredentialResolver.cpp
+++ b/xmltooling/security/impl/FilesystemCredentialResolver.cpp
@@ -141,7 +141,7 @@ namespace xmltooling {
class XMLTOOL_DLLLOCAL FilesystemCredentialResolver : public CredentialResolver
{
public:
- FilesystemCredentialResolver(const DOMElement* e);
+ FilesystemCredentialResolver(const DOMElement* e, bool deprecationSupport=true);
virtual ~FilesystemCredentialResolver();
Lockable* lock();
@@ -212,9 +212,9 @@ namespace xmltooling {
#pragma warning( pop )
#endif
- CredentialResolver* XMLTOOL_DLLLOCAL FilesystemCredentialResolverFactory(const DOMElement* const & e)
+ CredentialResolver* XMLTOOL_DLLLOCAL FilesystemCredentialResolverFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new FilesystemCredentialResolver(e);
+ return new FilesystemCredentialResolver(e, deprecationSupport);
}
static const XMLCh backingFilePath[] = UNICODE_LITERAL_15(b,a,c,k,i,n,g,F,i,l,e,P,a,t,h);
@@ -238,7 +238,7 @@ namespace xmltooling {
static const XMLCh _use[] = UNICODE_LITERAL_3(u,s,e);
};
-FilesystemCredentialResolver::FilesystemCredentialResolver(const DOMElement* e)
+FilesystemCredentialResolver::FilesystemCredentialResolver(const DOMElement* e, bool deprecationSupport)
: m_keyinfomask(XMLHelper::getAttrInt(e, 0, keyInfoMask)),
m_usage(Credential::UNSPECIFIED_CREDENTIAL), m_extractNames(true)
{
@@ -307,6 +307,7 @@ FilesystemCredentialResolver::FilesystemCredentialResolver(const DOMElement* e)
XMLToolingConfig::getConfig().getPathResolver()->resolve(m_key.source, PathResolver::XMLTOOLING_CFG_FILE);
m_key.local = true;
m_key.reloadChanges = XMLHelper::getAttrBool(e, true, _reloadChanges);
+ m_key.m_deprecationSupport = deprecationSupport;
}
else if ((e=XMLHelper::getFirstChildElement(keynode,_URL)) && e->hasChildNodes()) {
prop = e->getFirstChild()->getNodeValue();
@@ -318,6 +319,7 @@ FilesystemCredentialResolver::FilesystemCredentialResolver(const DOMElement* e)
throw XMLSecurityException("FilesystemCredentialResolver can't access key, backingFilePath missing from URL element.");
XMLToolingConfig::getConfig().getPathResolver()->resolve(m_key.backing, PathResolver::XMLTOOLING_CACHE_FILE);
m_key.reloadInterval = XMLHelper::getAttrInt(e, 0, _reloadInterval);
+ m_key.m_deprecationSupport = deprecationSupport;
}
else {
log.error("Path/URL element missing inside Key element");
@@ -351,6 +353,7 @@ FilesystemCredentialResolver::FilesystemCredentialResolver(const DOMElement* e)
XMLToolingConfig::getConfig().getPathResolver()->resolve(crl.source, PathResolver::XMLTOOLING_CFG_FILE);
crl.local = true;
crl.reloadChanges = XMLHelper::getAttrBool(e, true, _reloadChanges);
+ crl.m_deprecationSupport = deprecationSupport;
}
e = XMLHelper::getNextSiblingElement(e, Path);
}
@@ -370,6 +373,7 @@ FilesystemCredentialResolver::FilesystemCredentialResolver(const DOMElement* e)
throw XMLSecurityException("FilesystemCredentialResolver can't access CRL, backingFilePath missing from URL element.");
XMLToolingConfig::getConfig().getPathResolver()->resolve(crl.backing, PathResolver::XMLTOOLING_CACHE_FILE);
crl.reloadInterval = XMLHelper::getAttrInt(e, 0, _reloadInterval);
+ crl.m_deprecationSupport = deprecationSupport;
}
e = XMLHelper::getNextSiblingElement(e, _URL);
}
@@ -398,6 +402,7 @@ FilesystemCredentialResolver::FilesystemCredentialResolver(const DOMElement* e)
XMLToolingConfig::getConfig().getPathResolver()->resolve(cert.source, PathResolver::XMLTOOLING_CFG_FILE);
cert.local = true;
cert.reloadChanges = XMLHelper::getAttrBool(e, true, _reloadChanges);
+ cert.m_deprecationSupport = deprecationSupport;
}
else if (e->hasChildNodes() && XMLString::equals(e->getLocalName(), _URL)) {
m_certs.push_back(ManagedCert());
@@ -412,6 +417,7 @@ FilesystemCredentialResolver::FilesystemCredentialResolver(const DOMElement* e)
throw XMLSecurityException("FilesystemCredentialResolver can't access certificate, backingFilePath missing from URL element.");
XMLToolingConfig::getConfig().getPathResolver()->resolve(cert.backing, PathResolver::XMLTOOLING_CACHE_FILE);
cert.reloadInterval = XMLHelper::getAttrInt(e, 0, _reloadInterval);
+ cert.m_deprecationSupport = deprecationSupport;
}
e = XMLHelper::getNextSiblingElement(e);
}
diff --git a/xmltooling/security/impl/InlineKeyResolver.cpp b/xmltooling/security/impl/InlineKeyResolver.cpp
index 78e1324..e15118c 100644
--- a/xmltooling/security/impl/InlineKeyResolver.cpp
+++ b/xmltooling/security/impl/InlineKeyResolver.cpp
@@ -175,7 +175,7 @@ namespace xmltooling {
bool m_followRefs;
};
- KeyInfoResolver* XMLTOOL_DLLLOCAL InlineKeyInfoResolverFactory(const DOMElement* const & e)
+ KeyInfoResolver* XMLTOOL_DLLLOCAL InlineKeyInfoResolverFactory(const DOMElement* const & e, bool deprecationSupport)
{
return new InlineKeyResolver(e);
}
diff --git a/xmltooling/security/impl/ManagedResource.h b/xmltooling/security/impl/ManagedResource.h
index e995df2..29c0b72 100644
--- a/xmltooling/security/impl/ManagedResource.h
+++ b/xmltooling/security/impl/ManagedResource.h
@@ -41,13 +41,13 @@ namespace xmltooling {
class XMLTOOL_DLLLOCAL ManagedResource {
protected:
- ManagedResource() : local(true), reloadChanges(true), filestamp(0), reloadInterval(0) {}
+ ManagedResource() : local(true), reloadChanges(true), m_deprecationSupport(true), filestamp(0), reloadInterval(0) {}
~ManagedResource() {}
SOAPTransport* getTransport() {
SOAPTransport::Address addr("ManagedResource", source.c_str(), source.c_str());
std::string scheme(addr.m_endpoint, strchr(addr.m_endpoint,':') - addr.m_endpoint);
- SOAPTransport* ret = XMLToolingConfig::getConfig().SOAPTransportManager.newPlugin(scheme.c_str(), addr);
+ SOAPTransport* ret = XMLToolingConfig::getConfig().SOAPTransportManager.newPlugin(scheme.c_str(), addr, m_deprecationSupport);
if (ret)
ret->setCacheTag(&cacheTag);
return ret;
@@ -119,7 +119,7 @@ namespace xmltooling {
return true;
}
- bool local,reloadChanges;
+ bool local, reloadChanges, m_deprecationSupport;
std::string source,backing,cacheTag;
time_t filestamp,reloadInterval;
};
diff --git a/xmltooling/security/impl/PKIXPathValidator.cpp b/xmltooling/security/impl/PKIXPathValidator.cpp
index dacd195..bcac3fd 100644
--- a/xmltooling/security/impl/PKIXPathValidator.cpp
+++ b/xmltooling/security/impl/PKIXPathValidator.cpp
@@ -120,8 +120,9 @@ namespace xmltooling {
class XMLTOOL_DLLLOCAL PKIXPathValidator : public OpenSSLPathValidator
{
public:
- PKIXPathValidator(const xercesc::DOMElement* e)
+ PKIXPathValidator(const xercesc::DOMElement* e, bool deprecationSupport=true)
: m_log(Category::getInstance(XMLTOOLING_LOGCAT ".PathValidator.PKIX")),
+ m_deprecationSupport(deprecationSupport),
m_lock(XMLToolingConfig::getConfig().getNamedMutex(XMLTOOLING_LOGCAT ".PathValidator.PKIX")),
m_minRefreshDelay(XMLHelper::getAttrInt(e, 60, minRefreshDelay)),
m_minSecondsRemaining(XMLHelper::getAttrInt(e, 86400, minSecondsRemaining)),
@@ -142,6 +143,7 @@ namespace xmltooling {
bool isFreshCRL(XSECCryptoX509CRL *c, Category* log=nullptr) const;
Category& m_log;
+ bool m_deprecationSupport;
Mutex& m_lock;
time_t m_minRefreshDelay,m_minSecondsRemaining;
unsigned short m_minPercentRemaining;
@@ -149,9 +151,9 @@ namespace xmltooling {
static map<string,time_t> m_crlUpdateMap;
};
- PathValidator* XMLTOOL_DLLLOCAL PKIXPathValidatorFactory(const xercesc::DOMElement* const & e)
+ PathValidator* XMLTOOL_DLLLOCAL PKIXPathValidatorFactory(const xercesc::DOMElement* const & e, bool deprecationSupport)
{
- return new PKIXPathValidator(e);
+ return new PKIXPathValidator(e, deprecationSupport);
}
};
@@ -508,7 +510,7 @@ XSECCryptoX509CRL* PKIXPathValidator::getRemoteCRLs(const char* cdpuri) const
if (difftime(now, ts) > m_minRefreshDelay) {
SOAPTransport::Address addr("AbstractPKIXTrustEngine", cdpuri, cdpuri);
string scheme(addr.m_endpoint, strchr(addr.m_endpoint,':') - addr.m_endpoint);
- scoped_ptr<SOAPTransport> soap(XMLToolingConfig::getConfig().SOAPTransportManager.newPlugin(scheme.c_str(), addr));
+ scoped_ptr<SOAPTransport> soap(XMLToolingConfig::getConfig().SOAPTransportManager.newPlugin(scheme.c_str(), addr, m_deprecationSupport));
soap->send();
istream& msg = soap->receive();
Lock glock(m_lock);
diff --git a/xmltooling/security/impl/StaticDataSealerKeyStrategy.cpp b/xmltooling/security/impl/StaticDataSealerKeyStrategy.cpp
index 8ba834a..b1e9c42 100644
--- a/xmltooling/security/impl/StaticDataSealerKeyStrategy.cpp
+++ b/xmltooling/security/impl/StaticDataSealerKeyStrategy.cpp
@@ -55,7 +55,7 @@ namespace xmltooling {
scoped_ptr<XSECCryptoSymmetricKey> m_key;
};
- DataSealerKeyStrategy* XMLTOOL_DLLLOCAL StaticDataSealerKeyStrategyFactory(const DOMElement* const & e)
+ DataSealerKeyStrategy* XMLTOOL_DLLLOCAL StaticDataSealerKeyStrategyFactory(const DOMElement* const & e, bool deprecationSupport)
{
return new StaticDataSealerKeyStrategy(e);
}
diff --git a/xmltooling/security/impl/StaticPKIXTrustEngine.cpp b/xmltooling/security/impl/StaticPKIXTrustEngine.cpp
index 427be9b..c5e69a5 100644
--- a/xmltooling/security/impl/StaticPKIXTrustEngine.cpp
+++ b/xmltooling/security/impl/StaticPKIXTrustEngine.cpp
@@ -52,7 +52,7 @@ namespace xmltooling {
class XMLTOOL_DLLLOCAL StaticPKIXTrustEngine : public AbstractPKIXTrustEngine
{
public:
- StaticPKIXTrustEngine(const DOMElement* e=nullptr);
+ StaticPKIXTrustEngine(const DOMElement* e=nullptr, bool deprecationSupport=true);
virtual ~StaticPKIXTrustEngine() {}
@@ -70,9 +70,9 @@ namespace xmltooling {
friend class XMLTOOL_DLLLOCAL StaticPKIXIterator;
};
- TrustEngine* XMLTOOL_DLLLOCAL StaticPKIXTrustEngineFactory(const DOMElement* const & e)
+ TrustEngine* XMLTOOL_DLLLOCAL StaticPKIXTrustEngineFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new StaticPKIXTrustEngine(e);
+ return new StaticPKIXTrustEngine(e, deprecationSupport);
}
class XMLTOOL_DLLLOCAL StaticPKIXIterator : public AbstractPKIXTrustEngine::PKIXValidationInfoIterator
@@ -128,18 +128,18 @@ namespace xmltooling {
};
};
-StaticPKIXTrustEngine::StaticPKIXTrustEngine(const DOMElement* e)
- : AbstractPKIXTrustEngine(e), m_depth(XMLHelper::getAttrInt(e, 1, verifyDepth))
+StaticPKIXTrustEngine::StaticPKIXTrustEngine(const DOMElement* e, bool deprecationSupport)
+ : AbstractPKIXTrustEngine(e, deprecationSupport), TrustEngine(e, deprecationSupport), m_depth(XMLHelper::getAttrInt(e, 1, verifyDepth))
{
if (e && e->hasAttributeNS(nullptr, certificate)) {
// Simple File resolver config rooted here.
- m_credResolver.reset(XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(FILESYSTEM_CREDENTIAL_RESOLVER, e));
+ m_credResolver.reset(XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(FILESYSTEM_CREDENTIAL_RESOLVER, e, deprecationSupport));
}
else {
e = e ? XMLHelper::getFirstChildElement(e, _CredentialResolver) : nullptr;
string t = XMLHelper::getAttrString(e, nullptr, type);
if (!t.empty())
- m_credResolver.reset(XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(t.c_str(), e));
+ m_credResolver.reset(XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(t.c_str(), e, deprecationSupport));
else
throw XMLSecurityException("Missing <CredentialResolver> element, or no type attribute found");
}
diff --git a/xmltooling/security/impl/TrustEngine.cpp b/xmltooling/security/impl/TrustEngine.cpp
index 0ab28ac..9b61a69 100644
--- a/xmltooling/security/impl/TrustEngine.cpp
+++ b/xmltooling/security/impl/TrustEngine.cpp
@@ -56,13 +56,13 @@ void XMLTOOL_API xmltooling::registerTrustEngines()
static const XMLCh _KeyInfoResolver[] = UNICODE_LITERAL_15(K,e,y,I,n,f,o,R,e,s,o,l,v,e,r);
static const XMLCh type[] = UNICODE_LITERAL_4(t,y,p,e);
-TrustEngine::TrustEngine(const DOMElement* e) : m_keyInfoResolver(nullptr)
+TrustEngine::TrustEngine(const DOMElement* e, bool deprecationSupport) : m_keyInfoResolver(nullptr)
{
DOMElement* child = e ? XMLHelper::getFirstChildElement(e, _KeyInfoResolver) : nullptr;
if (child) {
string t = XMLHelper::getAttrString(child, nullptr, type);
if (!t.empty())
- m_keyInfoResolver = XMLToolingConfig::getConfig().KeyInfoResolverManager.newPlugin(t.c_str(), child);
+ m_keyInfoResolver = XMLToolingConfig::getConfig().KeyInfoResolverManager.newPlugin(t.c_str(), child, deprecationSupport);
else
throw UnknownExtensionException("<KeyInfoResolver> element found with no type attribute");
}
@@ -73,7 +73,7 @@ TrustEngine::~TrustEngine()
delete m_keyInfoResolver;
}
-SignatureTrustEngine::SignatureTrustEngine(const DOMElement* e) : TrustEngine(e)
+SignatureTrustEngine::SignatureTrustEngine(const DOMElement* e, bool deprecationSupport) : TrustEngine(e, deprecationSupport)
{
}
@@ -81,7 +81,7 @@ SignatureTrustEngine::~SignatureTrustEngine()
{
}
-X509TrustEngine::X509TrustEngine(const DOMElement* e) : TrustEngine(e)
+X509TrustEngine::X509TrustEngine(const DOMElement* e, bool deprecationSupport) : TrustEngine(e, deprecationSupport)
{
}
@@ -89,7 +89,7 @@ X509TrustEngine::~X509TrustEngine()
{
}
-OpenSSLTrustEngine::OpenSSLTrustEngine(const DOMElement* e) : X509TrustEngine(e)
+OpenSSLTrustEngine::OpenSSLTrustEngine(const DOMElement* e, bool deprecationSupport) : X509TrustEngine(e, deprecationSupport)
{
}
diff --git a/xmltooling/security/impl/VersionedDataSealerKeyStrategy.cpp b/xmltooling/security/impl/VersionedDataSealerKeyStrategy.cpp
index 627b895..34d6781 100644
--- a/xmltooling/security/impl/VersionedDataSealerKeyStrategy.cpp
+++ b/xmltooling/security/impl/VersionedDataSealerKeyStrategy.cpp
@@ -49,7 +49,7 @@ namespace xmltooling {
class XMLTOOL_DLLLOCAL VersionedDataSealerKeyStrategy : public DataSealerKeyStrategy, public ManagedResource {
public:
- VersionedDataSealerKeyStrategy(const DOMElement* e);
+ VersionedDataSealerKeyStrategy(const DOMElement* e, bool deprecationSupport=true);
virtual ~VersionedDataSealerKeyStrategy();
Lockable* lock();
@@ -70,20 +70,20 @@ namespace xmltooling {
string m_default;
};
- DataSealerKeyStrategy* XMLTOOL_DLLLOCAL VersionedDataSealerKeyStrategyFactory(const DOMElement* const & e)
+ DataSealerKeyStrategy* XMLTOOL_DLLLOCAL VersionedDataSealerKeyStrategyFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new VersionedDataSealerKeyStrategy(e);
+ return new VersionedDataSealerKeyStrategy(e, deprecationSupport);
}
};
-VersionedDataSealerKeyStrategy::VersionedDataSealerKeyStrategy(const DOMElement* e)
+VersionedDataSealerKeyStrategy::VersionedDataSealerKeyStrategy(const DOMElement* e, bool deprecationSupport)
: m_log(Category::getInstance(XMLTOOLING_LOGCAT".DataSealer")), m_lock(RWLock::create())
{
static const XMLCh backingFilePath[] = UNICODE_LITERAL_15(b,a,c,k,i,n,g,F,i,l,e,P,a,t,h);
static const XMLCh path[] = UNICODE_LITERAL_4(p,a,t,h);
static const XMLCh _reloadChanges[] = UNICODE_LITERAL_13(r,e,l,o,a,d,C,h,a,n,g,e,s);
- static const XMLCh _reloadInterval[] = UNICODE_LITERAL_14(r,e,l,o,a,d,I,n,t,e,r,v,a,l);
+ static const XMLCh _reloadInterval[] = UNICODE_LITERAL_14(r,e,l,o,a,d,I,n,t,e,r,v,a,l);
static const XMLCh url[] = UNICODE_LITERAL_3(u,r,l);
if (e->hasAttributeNS(nullptr, path)) {
@@ -104,6 +104,8 @@ VersionedDataSealerKeyStrategy::VersionedDataSealerKeyStrategy(const DOMElement*
else {
throw XMLSecurityException("DataSealer requires path or url XML attribute.");
}
+
+ m_deprecationSupport = deprecationSupport;
}
VersionedDataSealerKeyStrategy::~VersionedDataSealerKeyStrategy()
diff --git a/xmltooling/soap/impl/CURLSOAPTransport.cpp b/xmltooling/soap/impl/CURLSOAPTransport.cpp
index ca2d674..0d1d359 100644
--- a/xmltooling/soap/impl/CURLSOAPTransport.cpp
+++ b/xmltooling/soap/impl/CURLSOAPTransport.cpp
@@ -267,7 +267,7 @@ namespace xmltooling {
int XMLTOOL_DLLLOCAL verify_callback(X509_STORE_CTX* x509_ctx, void* arg);
#endif
- SOAPTransport* CURLSOAPTransportFactory(const SOAPTransport::Address& addr)
+ SOAPTransport* CURLSOAPTransportFactory(const SOAPTransport::Address& addr, bool deprecationSupport)
{
return new CURLSOAPTransport(addr);
}
diff --git a/xmltooling/soap/impl/SOAPClient.cpp b/xmltooling/soap/impl/SOAPClient.cpp
index ae85326..7910a48 100644
--- a/xmltooling/soap/impl/SOAPClient.cpp
+++ b/xmltooling/soap/impl/SOAPClient.cpp
@@ -148,7 +148,7 @@ void SOAPClient::send(const Envelope& env, const SOAPTransport::Address& addr)
if (!pch)
throw IOException("SOAP endpoint was not a URL.");
string scheme(addr.m_endpoint, pch-addr.m_endpoint);
- m_transport = XMLToolingConfig::getConfig().SOAPTransportManager.newPlugin(scheme.c_str(), addr);
+ m_transport = XMLToolingConfig::getConfig().SOAPTransportManager.newPlugin(scheme.c_str(), addr, false);
prepareTransport(*m_transport);
Category& log = Category::getInstance(XMLTOOLING_LOGCAT ".SOAPClient");
diff --git a/xmltooling/util/ReloadableXMLFile.cpp b/xmltooling/util/ReloadableXMLFile.cpp
index 48d0649..cb0ee89 100644
--- a/xmltooling/util/ReloadableXMLFile.cpp
+++ b/xmltooling/util/ReloadableXMLFile.cpp
@@ -92,7 +92,7 @@ static const XMLCh _TrustEngine[] = UNICODE_LITERAL_11(T,r,u,s,t,E,n,g,i,n,e
static const XMLCh _CredentialResolver[] = UNICODE_LITERAL_18(C,r,e,d,e,n,t,i,a,l,R,e,s,o,l,v,e,r);
#endif
-ReloadableXMLFile::ReloadableXMLFile(const DOMElement* e, Category& log, bool startReloadThread)
+ReloadableXMLFile::ReloadableXMLFile(const DOMElement* e, Category& log, bool startReloadThread, bool deprecationSupport)
: m_root(e), m_local(true), m_validate(false), m_filestamp(0), m_reloadInterval(0),
m_log(log), m_loaded(false), m_shutdown(false)
{
@@ -101,23 +101,36 @@ ReloadableXMLFile::ReloadableXMLFile(const DOMElement* e, Category& log, bool st
#endif
// Establish source of data...
- const XMLCh* source=e->getAttributeNS(nullptr,uri);
+ const XMLCh* source = e->getAttributeNS(nullptr, url);
if (!source || !*source) {
- source=e->getAttributeNS(nullptr,url);
+ if (deprecationSupport)
+ source = e->getAttributeNS(nullptr, uri);
if (!source || !*source) {
- source=e->getAttributeNS(nullptr,path);
+ source = e->getAttributeNS(nullptr, path);
if (!source || !*source) {
- source=e->getAttributeNS(nullptr,pathname);
- if (!source || !*source) {
- source=e->getAttributeNS(nullptr,file);
+ if (deprecationSupport) {
+ source = e->getAttributeNS(nullptr, pathname);
if (!source || !*source) {
- source=e->getAttributeNS(nullptr,filename);
+ source = e->getAttributeNS(nullptr, file);
+ if (!source || !*source) {
+ source = e->getAttributeNS(nullptr, filename);
+ if (source && *source) {
+ m_log.warn("DEPRECATED: filename attribute should be replaced with path to specify local resource");
+ }
+ }
+ else {
+ m_log.warn("DEPRECATED: file attribute should be replaced with path to specify local resource");
+ }
+ }
+ else {
+ m_log.warn("DEPRECATED: pathname attribute should be replaced with path to specify local resource");
}
}
}
}
else {
- m_local=false;
+ m_local = false;
+ m_log.warn("DEPRECATED: uri attribute should be replaced with url to specify remote resource");
}
}
else {
@@ -130,7 +143,7 @@ ReloadableXMLFile::ReloadableXMLFile(const DOMElement* e, Category& log, bool st
auto_ptr_char temp(source);
m_source = temp.get();
- if (!m_local && !strstr(m_source.c_str(),"://")) {
+ if (deprecationSupport && !m_local && !strstr(m_source.c_str(),"://")) {
log.warn("DEPRECATED: usage of uri/url attribute for a local resource, use path instead");
m_local = true;
}
@@ -139,19 +152,19 @@ ReloadableXMLFile::ReloadableXMLFile(const DOMElement* e, Category& log, bool st
// Check for signature bits.
if (e->hasAttributeNS(nullptr, certificate)) {
// Use a file-based credential resolver rooted here.
- m_credResolver.reset(XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(FILESYSTEM_CREDENTIAL_RESOLVER, e));
+ m_credResolver.reset(XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(FILESYSTEM_CREDENTIAL_RESOLVER, e, deprecationSupport));
}
else {
const DOMElement* sub = XMLHelper::getFirstChildElement(e, _CredentialResolver);
string t(XMLHelper::getAttrString(sub, nullptr, type));
if (!t.empty()) {
- m_credResolver.reset(XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(t.c_str(), sub));
+ m_credResolver.reset(XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(t.c_str(), sub, deprecationSupport));
}
else {
sub = XMLHelper::getFirstChildElement(e, _TrustEngine);
t = XMLHelper::getAttrString(sub, nullptr, type);
if (!t.empty()) {
- auto_ptr<TrustEngine> trust(XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(t.c_str(), sub));
+ auto_ptr<TrustEngine> trust(XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(t.c_str(), sub, deprecationSupport));
if (!dynamic_cast<SignatureTrustEngine*>(trust.get())) {
throw XMLToolingException("TrustEngine-based ReloadableXMLFile requires a SignatureTrustEngine plugin.");
}
@@ -204,12 +217,12 @@ ReloadableXMLFile::ReloadableXMLFile(const DOMElement* e, Category& log, bool st
}
}
}
- catch (exception&) {
+ catch (const exception&) {
}
}
- m_reloadInterval = XMLHelper::getAttrInt(e, 0, reloadInterval);
+ m_reloadInterval = XMLHelper::getAttrInt(e, 0, maxRefreshDelay);
if (m_reloadInterval == 0)
- m_reloadInterval = XMLHelper::getAttrInt(e, 0, maxRefreshDelay);
+ m_reloadInterval = XMLHelper::getAttrInt(e, 0, reloadInterval);
if (m_reloadInterval > 0) {
m_log.debug("will reload remote resource at most every %d seconds", m_reloadInterval);
m_lock.reset(RWLock::create());
@@ -221,7 +234,7 @@ ReloadableXMLFile::ReloadableXMLFile(const DOMElement* e, Category& log, bool st
startup();
}
else {
- log.debug("no resource uri/path/name supplied, will load inline configuration");
+ log.debug("no resource url/path supplied, will load inline configuration");
}
m_id = XMLHelper::getAttrString(e, nullptr, id);
@@ -617,7 +630,7 @@ void ReloadableXMLFile::validateSignature(Signature& sigObj) const
}
else if (m_trust) {
scoped_ptr<CredentialResolver> dummy(
- XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(DUMMY_CREDENTIAL_RESOLVER, nullptr)
+ XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(DUMMY_CREDENTIAL_RESOLVER, nullptr, false)
);
if (m_trust->validate(sigObj, *dummy, &cc))
return;
diff --git a/xmltooling/util/ReloadableXMLFile.h b/xmltooling/util/ReloadableXMLFile.h
index 0c56b0e..ae698f3 100644
--- a/xmltooling/util/ReloadableXMLFile.h
+++ b/xmltooling/util/ReloadableXMLFile.h
@@ -63,9 +63,9 @@ namespace xmltooling {
* Constructor taking a DOM element supporting the following content:
*
* <dl>
- * <dt>file | filename | path | pathname</dt>
+ * <dt>path</dt>
* <dd>identifies a local file</dd>
- * <dt>uri | url</dt>
+ * <dt>url</dt>
* <dd>identifies a remote resource</dd>
* <dt>validate</dt>
* <dd>use a validating parser</dd>
@@ -88,11 +88,12 @@ namespace xmltooling {
* <dd>requires XML be signed with an enveloped signature verifiable with specified TrustEngine</dd>
* </dl>
*
- * @param e DOM to supply configuration
- * @param log logging object to use
- * @param startReloadThread true iff refresh thread for resources should be started by constructor
+ * @param e DOM to supply configuration
+ * @param log logging object to use
+ * @param startReloadThread true iff refresh thread for resources should be started by constructor
+ * @param deprecationSupport true iff deprecated options and settings should be accepted
*/
- ReloadableXMLFile(const xercesc::DOMElement* e, logging::Category& log, bool startReloadThread=true);
+ ReloadableXMLFile(const xercesc::DOMElement* e, logging::Category& log, bool startReloadThread=true, bool deprecationSupport=true);
virtual ~ReloadableXMLFile();
diff --git a/xmltooling/util/ReplayCache.cpp b/xmltooling/util/ReplayCache.cpp
index 4172cac..9c16185 100644
--- a/xmltooling/util/ReplayCache.cpp
+++ b/xmltooling/util/ReplayCache.cpp
@@ -35,7 +35,7 @@ using namespace std;
ReplayCache::ReplayCache(StorageService* storage)
: m_owned(storage==nullptr),
- m_storage(storage ? storage : XMLToolingConfig::getConfig().StorageServiceManager.newPlugin(MEMORY_STORAGE_SERVICE, nullptr)),
+ m_storage(storage ? storage : XMLToolingConfig::getConfig().StorageServiceManager.newPlugin(MEMORY_STORAGE_SERVICE, nullptr, false)),
m_storageCaps(m_storage->getCapabilities())
{
}
diff --git a/xmltoolingtest/DataSealerTest.h b/xmltoolingtest/DataSealerTest.h
index f782922..af7efd4 100644
--- a/xmltoolingtest/DataSealerTest.h
+++ b/xmltoolingtest/DataSealerTest.h
@@ -50,7 +50,7 @@ public:
auto_ptr<DataSealerKeyStrategy> keyStrategy(
XMLToolingConfig::getConfig().DataSealerKeyStrategyManager.newPlugin(
- STATIC_DATA_SEALER_KEY_STRATEGY, doc->getDocumentElement()
+ STATIC_DATA_SEALER_KEY_STRATEGY, doc->getDocumentElement(), false
)
);
@@ -93,7 +93,7 @@ public:
auto_ptr<DataSealerKeyStrategy> keyStrategy(
XMLToolingConfig::getConfig().DataSealerKeyStrategyManager.newPlugin(
- VERSIONED_DATA_SEALER_KEY_STRATEGY, doc->getDocumentElement()
+ VERSIONED_DATA_SEALER_KEY_STRATEGY, doc->getDocumentElement(), false
)
);
diff --git a/xmltoolingtest/EncryptionTest.h b/xmltoolingtest/EncryptionTest.h
index dd4b5e7..88f8df0 100644
--- a/xmltoolingtest/EncryptionTest.h
+++ b/xmltoolingtest/EncryptionTest.h
@@ -43,7 +43,7 @@ public:
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(in);
XercesJanitor<DOMDocument> janitor(doc);
m_resolver = XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(
- CHAINING_CREDENTIAL_RESOLVER,doc->getDocumentElement()
+ CHAINING_CREDENTIAL_RESOLVER, doc->getDocumentElement(), false
);
XMLObjectBuilder::registerDefaultBuilder(new UnknownElementBuilder());
}
diff --git a/xmltoolingtest/ExplicitKeyTrustEngineTest.h b/xmltoolingtest/ExplicitKeyTrustEngineTest.h
index 58ff832..ec9544a 100644
--- a/xmltoolingtest/ExplicitKeyTrustEngineTest.h
+++ b/xmltoolingtest/ExplicitKeyTrustEngineTest.h
@@ -46,7 +46,7 @@ public:
DOMDocument* docFsCred=XMLToolingConfig::getConfig().getParser().parse(inFsCred);
XercesJanitor<DOMDocument> janitorFsCred(docFsCred);
m_resolver = XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(
- CHAINING_CREDENTIAL_RESOLVER,docFsCred->getDocumentElement()
+ CHAINING_CREDENTIAL_RESOLVER, docFsCred->getDocumentElement(), false
);
config = data_path + "ExplicitKeyTrustEngine.xml";
@@ -56,7 +56,7 @@ public:
TrustEngine *trustEngine =
XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(
- EXPLICIT_KEY_TRUSTENGINE, docTrustEngine->getDocumentElement()
+ EXPLICIT_KEY_TRUSTENGINE, docTrustEngine->getDocumentElement(), false
);
m_trustEngine = dynamic_cast<X509TrustEngine*>(trustEngine);
diff --git a/xmltoolingtest/FilesystemCredentialResolverTest.h b/xmltoolingtest/FilesystemCredentialResolverTest.h
index b3c022f..aec4e58 100644
--- a/xmltoolingtest/FilesystemCredentialResolverTest.h
+++ b/xmltoolingtest/FilesystemCredentialResolverTest.h
@@ -41,7 +41,7 @@ public:
scoped_ptr<CredentialResolver> credResolver(
XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(
- CHAINING_CREDENTIAL_RESOLVER,doc->getDocumentElement()
+ CHAINING_CREDENTIAL_RESOLVER, doc->getDocumentElement(), false
)
);
diff --git a/xmltoolingtest/InlineKeyResolverTest.h b/xmltoolingtest/InlineKeyResolverTest.h
index c4fa64f..8917a31 100644
--- a/xmltoolingtest/InlineKeyResolverTest.h
+++ b/xmltoolingtest/InlineKeyResolverTest.h
@@ -55,7 +55,9 @@ public:
ifstream in(config.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(in);
XercesJanitor<DOMDocument> janitor(doc);
- m_resolver=XMLToolingConfig::getConfig().KeyInfoResolverManager.newPlugin(INLINE_KEYINFO_RESOLVER,doc->getDocumentElement());
+ m_resolver=XMLToolingConfig::getConfig().KeyInfoResolverManager.newPlugin(
+ INLINE_KEYINFO_RESOLVER, doc->getDocumentElement(), false
+ );
}
void tearDown() {
@@ -101,7 +103,7 @@ public:
DOMDocument* cdoc=XMLToolingConfig::getConfig().getParser().parse(in);
XercesJanitor<DOMDocument> cjanitor(cdoc);
CredentialResolver* cresolver = XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(
- CHAINING_CREDENTIAL_RESOLVER,cdoc->getDocumentElement()
+ CHAINING_CREDENTIAL_RESOLVER, cdoc->getDocumentElement(), false
);
CredentialCriteria cc;
@@ -142,7 +144,7 @@ public:
DOMDocument* cdoc=XMLToolingConfig::getConfig().getParser().parse(in);
XercesJanitor<DOMDocument> cjanitor(cdoc);
CredentialResolver* cresolver = XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(
- CHAINING_CREDENTIAL_RESOLVER,cdoc->getDocumentElement()
+ CHAINING_CREDENTIAL_RESOLVER, cdoc->getDocumentElement(), false
);
CredentialCriteria cc;
diff --git a/xmltoolingtest/MemoryStorageServiceTest.h b/xmltoolingtest/MemoryStorageServiceTest.h
index 4e0d691..6068daf 100644
--- a/xmltoolingtest/MemoryStorageServiceTest.h
+++ b/xmltoolingtest/MemoryStorageServiceTest.h
@@ -32,7 +32,7 @@ public:
void testMemoryService() {
scoped_ptr<StorageService> storage(
- XMLToolingConfig::getConfig().StorageServiceManager.newPlugin(MEMORY_STORAGE_SERVICE,nullptr)
+ XMLToolingConfig::getConfig().StorageServiceManager.newPlugin(MEMORY_STORAGE_SERVICE,nullptr,false)
);
string data;
diff --git a/xmltoolingtest/PKIXEngineTest.h b/xmltoolingtest/PKIXEngineTest.h
index 11fb21b..6005c22 100644
--- a/xmltoolingtest/PKIXEngineTest.h
+++ b/xmltoolingtest/PKIXEngineTest.h
@@ -37,7 +37,7 @@ class PKIXEngineTest : public CxxTest::TestSuite {
XercesJanitor<DOMDocument> janitor(doc);
return dynamic_cast<X509TrustEngine*>(
XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(
- STATIC_PKIX_TRUSTENGINE, doc->getDocumentElement()
+ STATIC_PKIX_TRUSTENGINE, doc->getDocumentElement(), false
)
);
}
@@ -51,8 +51,8 @@ class PKIXEngineTest : public CxxTest::TestSuite {
public:
void setUp() {
- m_dummy = XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(DUMMY_CREDENTIAL_RESOLVER, nullptr);
- m_chain = dynamic_cast<ChainingTrustEngine*>(XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(CHAINING_TRUSTENGINE, nullptr));
+ m_dummy = XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(DUMMY_CREDENTIAL_RESOLVER, nullptr, false);
+ m_chain = dynamic_cast<ChainingTrustEngine*>(XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(CHAINING_TRUSTENGINE, nullptr, false));
m_ee = m_int1 = m_int2 = m_int3 = nullptr;
vector<XSECCryptoX509*> certs;
diff --git a/xmltoolingtest/SecurityHelperTest.h b/xmltoolingtest/SecurityHelperTest.h
index 6395c00..6adbac4 100644
--- a/xmltoolingtest/SecurityHelperTest.h
+++ b/xmltoolingtest/SecurityHelperTest.h
@@ -31,7 +31,7 @@ class SecurityHelperTest : public CxxTest::TestSuite {
SOAPTransport* getTransport(const char* url) {
SOAPTransport::Address addr("SecurityHelperTest", "spaces.internet2.edu", url);
string scheme(addr.m_endpoint, strchr(addr.m_endpoint,':') - addr.m_endpoint);
- return XMLToolingConfig::getConfig().SOAPTransportManager.newPlugin(scheme.c_str(), addr);
+ return XMLToolingConfig::getConfig().SOAPTransportManager.newPlugin(scheme.c_str(), addr, false);
}
public:
void setUp() {
diff --git a/xmltoolingtest/SignatureTest.h b/xmltoolingtest/SignatureTest.h
index 2aa7680..3723576 100644
--- a/xmltoolingtest/SignatureTest.h
+++ b/xmltoolingtest/SignatureTest.h
@@ -94,7 +94,7 @@ public:
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(in);
XercesJanitor<DOMDocument> janitor(doc);
m_resolver = XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(
- CHAINING_CREDENTIAL_RESOLVER,doc->getDocumentElement()
+ CHAINING_CREDENTIAL_RESOLVER,doc->getDocumentElement(), false
);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list