VS10 solution files, convert from NULL macro to nullptr.
[shibboleth/sp.git] / shibsp / attribute / filtering / impl / AttributeScopeMatchesShibMDScopeFunctor.cpp
index 5b7b26c..96bf8dc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2001-2007 Internet2
+ *  Copyright 2001-2010 Internet2
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,7 +17,8 @@
 /**
  * AttributeScopeMatchesShibMDScopeFunctor.cpp
  * 
- * A match function that ensures that an attributes value's scope matches a scope given in metadata for the entity or role.
+ * A match function that ensures that an attributes value's scope matches
+ * a scope given in metadata for the entity or role.
  */
 
 #include "internal.h"
 #include "attribute/Attribute.h"
 #include "attribute/filtering/FilteringContext.h"
 #include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
 #include "metadata/MetadataExt.h"
 
+#include <saml/saml2/metadata/Metadata.h>
 #include <xercesc/util/regx/RegularExpression.hpp>
 
 using namespace opensaml::saml2md;
@@ -44,7 +47,7 @@ namespace shibsp {
     {
     public:
         bool evaluatePolicyRequirement(const FilteringContext& filterContext) const {
-            return false;
+            throw AttributeFilteringException("Metadata scope matching not usable as a PolicyRequirement.");
         }
 
         bool evaluatePermitValue(const FilteringContext& filterContext, const Attribute& attribute, size_t index) const {
@@ -57,7 +60,7 @@ namespace shibsp {
                 return false;
 
             const Scope* rule;
-            const XMLCh* widescope=NULL;
+            const XMLCh* widescope=nullptr;
             const Extensions* ext = issuer->getExtensions();
             if (ext) {
                 const vector<XMLObject*>& exts = ext->getUnknownXMLObjects();