From 46ac496b77b850309c07e732ff89fa41c776915d Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Fri, 11 May 2007 06:08:26 +0000 Subject: [PATCH] Multi-line svn commit, see body. Method scoping and map insert fixes. Move zlib references out of the way and add to dist. --- saml/Makefile.am | 2 +- saml/binding/HTTPResponse.h | 6 ++++-- saml/binding/SOAPClient.h | 2 ++ saml/binding/impl/ArtifactMap.cpp | 2 +- saml/saml.vcproj | 4 ++-- saml/saml2/binding/impl/SAML2Redirect.cpp | 2 +- saml/saml2/metadata/AbstractMetadataProvider.h | 3 +++ saml/saml2/metadata/ChainingMetadataProvider.h | 3 +++ saml/saml2/metadata/MetadataCredentialCriteria.h | 2 +- saml/saml2/metadata/impl/AbstractMetadataProvider.cpp | 16 ++++++---------- saml/saml2/metadata/impl/XMLMetadataProvider.cpp | 1 + 11 files changed, 25 insertions(+), 18 deletions(-) diff --git a/saml/Makefile.am b/saml/Makefile.am index 4453d9f..10fceb9 100644 --- a/saml/Makefile.am +++ b/saml/Makefile.am @@ -175,4 +175,4 @@ libsaml_la_LDFLAGS = -version-info 2:0:0 install-exec-hook: for la in $(lib_LTLIBRARIES) ; do rm -f $(DESTDIR)$(libdir)/$$la ; done -EXTRA_DIST = saml.vcproj +EXTRA_DIST = saml.vcproj zlib diff --git a/saml/binding/HTTPResponse.h b/saml/binding/HTTPResponse.h index 20f73ca..6c87fdb 100644 --- a/saml/binding/HTTPResponse.h +++ b/saml/binding/HTTPResponse.h @@ -85,12 +85,14 @@ namespace opensaml { SAML_HTTP_STATUS_ERROR = 500 }; + using GenericResponse::sendResponse; + long sendError(std::istream& inputStream) { - return static_cast(this)->sendResponse(inputStream, SAML_HTTP_STATUS_ERROR); + return sendResponse(inputStream, SAML_HTTP_STATUS_ERROR); } long sendResponse(std::istream& inputStream) { - return static_cast(this)->sendResponse(inputStream, SAML_HTTP_STATUS_OK); + return sendResponse(inputStream, SAML_HTTP_STATUS_OK); } }; }; diff --git a/saml/binding/SOAPClient.h b/saml/binding/SOAPClient.h index aa2a995..52a7845 100644 --- a/saml/binding/SOAPClient.h +++ b/saml/binding/SOAPClient.h @@ -58,6 +58,8 @@ namespace opensaml { m_force = force; } + using soap11::SOAPClient::send; + /** * SAML-specific method uses a RoleDescriptor to determine the peer name and prepare the * transport layer with peer credential information. The SecurityPolicy is also reset, diff --git a/saml/binding/impl/ArtifactMap.cpp b/saml/binding/impl/ArtifactMap.cpp index 2abaecc..9d4e347 100644 --- a/saml/binding/impl/ArtifactMap.cpp +++ b/saml/binding/impl/ArtifactMap.cpp @@ -105,7 +105,7 @@ void ArtifactMappings::storeContent(XMLObject* content, const SAMLArtifact* arti if (relyingParty) m.m_relying = relyingParty; m.m_expires = now + TTL; - m_expMap.insert(make_pair(m.m_expires,hexed)); + m_expMap.insert(pair(m.m_expires,hexed)); } XMLObject* ArtifactMappings::retrieveContent(const SAMLArtifact* artifact, const char* relyingParty) diff --git a/saml/saml.vcproj b/saml/saml.vcproj index 0069ba2..2172bd5 100644 --- a/saml/saml.vcproj +++ b/saml/saml.vcproj @@ -40,7 +40,7 @@ +#include #include #include diff --git a/saml/saml2/metadata/AbstractMetadataProvider.h b/saml/saml2/metadata/AbstractMetadataProvider.h index 09d7134..3506cac 100644 --- a/saml/saml2/metadata/AbstractMetadataProvider.h +++ b/saml/saml2/metadata/AbstractMetadataProvider.h @@ -61,6 +61,9 @@ namespace opensaml { public: virtual ~AbstractMetadataProvider(); + using MetadataProvider::getEntityDescriptor; + using MetadataProvider::getEntitiesDescriptor; + void emitChangeEvent() const; const EntityDescriptor* getEntityDescriptor(const char* id, bool requireValidMetadata=true) const; const EntityDescriptor* getEntityDescriptor(const SAMLArtifact* artifact) const; diff --git a/saml/saml2/metadata/ChainingMetadataProvider.h b/saml/saml2/metadata/ChainingMetadataProvider.h index 5eab3cf..5dc0f46 100644 --- a/saml/saml2/metadata/ChainingMetadataProvider.h +++ b/saml/saml2/metadata/ChainingMetadataProvider.h @@ -86,6 +86,9 @@ namespace opensaml { return NULL; } + using MetadataProvider::getEntityDescriptor; + using MetadataProvider::getEntitiesDescriptor; + xmltooling::Lockable* lock(); void unlock(); void init(); diff --git a/saml/saml2/metadata/MetadataCredentialCriteria.h b/saml/saml2/metadata/MetadataCredentialCriteria.h index f23be27..dfe4bcc 100644 --- a/saml/saml2/metadata/MetadataCredentialCriteria.h +++ b/saml/saml2/metadata/MetadataCredentialCriteria.h @@ -60,7 +60,7 @@ namespace opensaml { return m_role; } - bool matches(xmltooling::Credential& credential) const { + bool matches(const xmltooling::Credential& credential) const { const MetadataCredentialContext* context = dynamic_cast(credential.getCredentalContext()); if (context) { // Check for a usage mismatch. diff --git a/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp b/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp index 042e962..196962b 100644 --- a/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp +++ b/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp @@ -76,7 +76,7 @@ void AbstractMetadataProvider::index(EntityDescriptor* site, time_t validUntil) auto_ptr_char id(site->getEntityID()); if (id.get()) { - m_sites.insert(make_pair(id.get(),site)); + m_sites.insert(sitemap_t::value_type(id.get(),site)); } // Process each IdP role. @@ -93,7 +93,7 @@ void AbstractMetadataProvider::index(EntityDescriptor* site, time_t validUntil) if (sid) { auto_ptr_char sourceid(sid->getID()); if (sourceid.get()) { - m_sources.insert(pair(sourceid.get(),site)); + m_sources.insert(sitemap_t::value_type(sourceid.get(),site)); break; } } @@ -101,25 +101,21 @@ void AbstractMetadataProvider::index(EntityDescriptor* site, time_t validUntil) } // Hash the ID. - m_sources.insert( - pair(SAMLConfig::getConfig().hashSHA1(id.get(), true),site) - ); + m_sources.insert(sitemap_t::value_type(SAMLConfig::getConfig().hashSHA1(id.get(), true),site)); // Load endpoints for type 0x0002 artifacts. const vector& locs=const_cast(*i)->getArtifactResolutionServices(); for (vector::const_iterator loc=locs.begin(); loc!=locs.end(); loc++) { auto_ptr_char location((*loc)->getLocation()); if (location.get()) - m_sources.insert(pair(location.get(),site)); + m_sources.insert(sitemap_t::value_type(location.get(),site)); } } // SAML 2.0? if ((*i)->hasSupport(samlconstants::SAML20P_NS)) { // Hash the ID. - m_sources.insert( - pair(SAMLConfig::getConfig().hashSHA1(id.get(), true),site) - ); + m_sources.insert(sitemap_t::value_type(SAMLConfig::getConfig().hashSHA1(id.get(), true),site)); } } } @@ -131,7 +127,7 @@ void AbstractMetadataProvider::index(EntitiesDescriptor* group, time_t validUnti auto_ptr_char name(group->getName()); if (name.get()) { - m_groups.insert(make_pair(name.get(),group)); + m_groups.insert(groupmap_t::value_type(name.get(),group)); } const vector& groups=const_cast(group)->getEntitiesDescriptors(); diff --git a/saml/saml2/metadata/impl/XMLMetadataProvider.cpp b/saml/saml2/metadata/impl/XMLMetadataProvider.cpp index a770610..ffa4411 100644 --- a/saml/saml2/metadata/impl/XMLMetadataProvider.cpp +++ b/saml/saml2/metadata/impl/XMLMetadataProvider.cpp @@ -64,6 +64,7 @@ namespace opensaml { pair load(); private: + using AbstractMetadataProvider::index; void index(); XMLObject* m_object; -- 2.1.4