X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=saml%2Fsaml2%2Fmetadata%2Fimpl%2FAbstractMetadataProvider.cpp;h=fde978a2d19ff3af6a967ce101f71a0d4c0034e2;hb=2cf60ce131535beae932489d2d1e3d2355799061;hp=59e430308870f536d8cff38a1a3b688ab20fced4;hpb=de2f284586672fe92284a00b942c48115ddd11f7;p=shibboleth%2Fopensaml2.git diff --git a/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp b/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp index 59e4303..fde978a 100644 --- a/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp +++ b/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2006 Internet2 + * Copyright 2001-2007 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ */ #include "internal.h" -#include "SAMLArtifact.h" +#include "binding/SAMLArtifact.h" #include "saml2/metadata/Metadata.h" #include "saml2/metadata/AbstractMetadataProvider.h" @@ -80,12 +80,12 @@ void AbstractMetadataProvider::index(EntityDescriptor* site, time_t validUntil) const vector& roles=const_cast(site)->getIDPSSODescriptors(); for (vector::const_iterator i=roles.begin(); i!=roles.end(); i++) { // SAML 1.x? - if ((*i)->hasSupport(SAMLConstants::SAML10_PROTOCOL_ENUM) || (*i)->hasSupport(SAMLConstants::SAML11_PROTOCOL_ENUM)) { + if ((*i)->hasSupport(samlconstants::SAML10_PROTOCOL_ENUM) || (*i)->hasSupport(samlconstants::SAML11_PROTOCOL_ENUM)) { // Check for SourceID extension element. const Extensions* exts=(*i)->getExtensions(); - if (exts) { - const list& children=exts->getXMLObjects(); - for (list::const_iterator ext=children.begin(); ext!=children.end(); ext++) { + if (exts && exts->hasChildren()) { + const vector& children=exts->getUnknownXMLObjects(); + for (vector::const_iterator ext=children.begin(); ext!=children.end(); ++ext) { SourceID* sid=dynamic_cast(*ext); if (sid) { auto_ptr_char sourceid(sid->getID()); @@ -112,7 +112,7 @@ void AbstractMetadataProvider::index(EntityDescriptor* site, time_t validUntil) } // SAML 2.0? - if ((*i)->hasSupport(SAMLConstants::SAML20P_NS)) { + if ((*i)->hasSupport(samlconstants::SAML20P_NS)) { // Hash the ID. m_sources.insert( pair(SAMLConfig::getConfig().hashSHA1(id.get(), true),site)