[cpp-xmltooling COMMIT] /branches/REL_1/xmltooling/util/ReloadableXMLFile.cpp
noreply at shibboleth.net
noreply at shibboleth.net
Wed Sep 21 01:55:13 BST 2011
Author: scantor
Date: Wed Sep 21 01:55:13 2011
New Revision: 909
URL: http://svn.shibboleth.net/view/cpp-xmltooling?rev=909&view=rev
Log:
Remove inline dummy credential resolver.
Modified:
branches/REL_1/xmltooling/util/ReloadableXMLFile.cpp
Modified: branches/REL_1/xmltooling/util/ReloadableXMLFile.cpp
URL: http://svn.shibboleth.net/view/cpp-xmltooling/branches/REL_1/xmltooling/util/ReloadableXMLFile.cpp?rev=909&r1=908&r2=909&view=diff
==============================================================================
--- branches/REL_1/xmltooling/util/ReloadableXMLFile.cpp (original)
+++ branches/REL_1/xmltooling/util/ReloadableXMLFile.cpp Wed Sep 21 01:55:13 2011
@@ -67,25 +67,6 @@
using namespace xercesc;
using namespace std;
-#ifndef XMLTOOLING_LITE
-namespace {
- class XMLTOOL_DLLLOCAL DummyCredentialResolver : public CredentialResolver
- {
- public:
- DummyCredentialResolver() {}
- ~DummyCredentialResolver() {}
-
- Lockable* lock() {return this;}
- void unlock() {}
-
- const Credential* resolve(const CredentialCriteria* criteria=nullptr) const {return nullptr;}
- vector<const Credential*>::size_type resolve(
- vector<const Credential*>& results, const CredentialCriteria* criteria=nullptr
- ) const {return 0;}
- };
-};
-#endif
-
static const XMLCh id[] = UNICODE_LITERAL_2(i,d);
static const XMLCh uri[] = UNICODE_LITERAL_3(u,r,i);
static const XMLCh url[] = UNICODE_LITERAL_3(u,r,l);
@@ -614,8 +595,10 @@
}
}
else if (m_trust) {
- DummyCredentialResolver dummy;
- if (m_trust->validate(sigObj, dummy, &cc))
+ auto_ptr<CredentialResolver> dummy(
+ XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(DUMMY_CREDENTIAL_RESOLVER, nullptr)
+ );
+ if (m_trust->validate(sigObj, *(dummy.get()), &cc))
return;
throw XMLSecurityException("TrustEngine unable to verify signature.");
}
More information about the commits
mailing list