Avoid use of nullptr.
[shibboleth/cpp-sp-resolver.git] / shibresolver / resolver.cpp
index fe75fa2..a328f1d 100644 (file)
@@ -278,20 +278,18 @@ void RemotedResolver::resolve(
 {
 #ifndef SHIBSP_LITE
     Category& log = Category::getInstance(SHIBRESOLVER_LOGCAT);
-    pair<const EntityDescriptor*,const RoleDescriptor*> entity = pair<const EntityDescriptor*,const RoleDescriptor*>(nullptr,nullptr);
+    pair<const EntityDescriptor*,const RoleDescriptor*> entity = pair<const EntityDescriptor*,const RoleDescriptor*>(NULL,NULL);
     MetadataProvider* m = app.getMetadataProvider();
     Locker locker(m);
     if (issuer && *issuer) {
-        // Use metadata to locate the IdP's SSO service.
+        // Lookup metadata for the issuer.
         MetadataProviderCriteria mc(app, issuer, &IDPSSODescriptor::ELEMENT_QNAME, samlconstants::SAML20P_NS);
         entity = m->getEntityDescriptor(mc);
         if (!entity.first) {
             log.warn("unable to locate metadata for provider (%s)", issuer);
-            throw MetadataException("Unable to locate metadata for identity provider ($entityID)", namedparams(1, "entityID", issuer));
         }
         else if (!entity.second) {
             log.warn("unable to locate SAML 2.0 identity provider role for provider (%s)", issuer);
-            throw MetadataException("Unable to locate SAML 2.0 identity provider role for provider ($entityID)", namedparams(1, "entityID", issuer));
         }
     }
 
@@ -305,8 +303,8 @@ void RemotedResolver::resolve(
             if (mprefix.first) {
                 log.debug("extracting metadata-derived attributes...");
                 try {
-                    // We pass nullptr for "issuer" because the IdP isn't the one asserting metadata-based attributes.
-                    extractor->extractAttributes(app, nullptr, *entity.second, resolvedAttrs);
+                    // We pass NULL for "issuer" because the IdP isn't the one asserting metadata-based attributes.
+                    extractor->extractAttributes(app, NULL, *entity.second, resolvedAttrs);
                     for (vector<Attribute*>::iterator a = resolvedAttrs.begin(); a != resolvedAttrs.end(); ++a) {
                         vector<string>& ids = (*a)->getAliases();
                         for (vector<string>::iterator id = ids.begin(); id != ids.end(); ++id)
@@ -365,9 +363,9 @@ void RemotedResolver::resolve(
                     app,
                     entity.first,
                     samlconstants::SAML20P_NS,
-                    nullptr,
-                    nullptr,
-                    nullptr,
+                    NULL,
+                    NULL,
+                    NULL,
                     &assertions,
                     &inputs
                     )