From 17b312daa349580f67cc07fc190125224146cf14 Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Fri, 8 Feb 2008 17:57:03 +0000 Subject: [PATCH] Allow role lookup with no protocol. --- saml/saml2/metadata/impl/AbstractMetadataProvider.cpp | 2 +- saml/saml2/metadata/impl/ChainingMetadataProvider.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp b/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp index dd9cc14..fd7948c 100644 --- a/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp +++ b/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp @@ -205,7 +205,7 @@ pair AbstractMetadataProvider::ge if (!result.first && !criteria.validOnly && range.first!=range.second) result.first = range.first->second; - if (result.first && criteria.role && criteria.protocol) { + if (result.first && criteria.role) { result.second = result.first->getRoleDescriptor(*criteria.role, criteria.protocol); if (!result.second && criteria.protocol2) result.second = result.first->getRoleDescriptor(*criteria.role, criteria.protocol2); diff --git a/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp b/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp index f1e5881..a55057e 100644 --- a/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp +++ b/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp @@ -167,8 +167,6 @@ const EntitiesDescriptor* ChainingMetadataProvider::getEntitiesDescriptor(const pair ChainingMetadataProvider::getEntityDescriptor(const Criteria& criteria) const { - bool bRole = (criteria.role && criteria.protocol); // searching for role also? - // Clear any existing lock. const_cast(this)->unlock(); @@ -180,7 +178,7 @@ pair ChainingMetadataProvider::ge (*i)->lock(); cur = (*i)->getEntityDescriptor(criteria); if (cur.first) { - if (bRole) { + if (criteria.role) { // We want a role also. Did we find one? if (cur.second) { // Are we using a first match policy? -- 2.1.4