Allow for no metadata sources.
authorScott Cantor <cantor.2@osu.edu>
Fri, 25 Mar 2011 13:47:07 +0000 (13:47 +0000)
committerScott Cantor <cantor.2@osu.edu>
Fri, 25 Mar 2011 13:47:07 +0000 (13:47 +0000)
src/shibresolver/resolver.cpp

index 503ad8c..83b6269 100644 (file)
@@ -342,9 +342,12 @@ void RemotedResolver::resolve(
 #ifndef SHIBSP_LITE
     Category& log = Category::getInstance(SHIBRESOLVER_LOGCAT);
     pair<const EntityDescriptor*,const RoleDescriptor*> entity = make_pair((EntityDescriptor*)NULL, (RoleDescriptor*)NULL);
 #ifndef SHIBSP_LITE
     Category& log = Category::getInstance(SHIBRESOLVER_LOGCAT);
     pair<const EntityDescriptor*,const RoleDescriptor*> entity = make_pair((EntityDescriptor*)NULL, (RoleDescriptor*)NULL);
-    MetadataProvider* m = app.getMetadataProvider();
+    MetadataProvider* m = app.getMetadataProvider(false);
     Locker locker(m);
     Locker locker(m);
-    if (issuer && *issuer) {
+    if (!m) {
+        log.warn("no metadata providers are configured");
+    }
+    else if (issuer && *issuer) {
         // Lookup metadata for the issuer.
         MetadataProviderCriteria mc(app, issuer, &IDPSSODescriptor::ELEMENT_QNAME, samlconstants::SAML20P_NS);
         entity = m->getEntityDescriptor(mc);
         // Lookup metadata for the issuer.
         MetadataProviderCriteria mc(app, issuer, &IDPSSODescriptor::ELEMENT_QNAME, samlconstants::SAML20P_NS);
         entity = m->getEntityDescriptor(mc);