Missing header.
[shibboleth/cpp-opensaml.git] / saml / saml2 / profile / impl / BearerConfirmationRule.cpp
index 0541c58..37acb15 100644 (file)
@@ -26,7 +26,9 @@
 #include "saml2/core/Assertions.h"
 #include "saml2/profile/SAML2AssertionPolicy.h"
 
+#include <xercesc/util/XMLUniDefs.hpp>
 #include <xmltooling/logging.h>
+#include <xmltooling/XMLToolingConfig.h>
 #include <xmltooling/io/HTTPRequest.h>
 
 using namespace opensaml::saml2;
@@ -84,7 +86,7 @@ bool BearerConfirmationRule::evaluate(const XMLObject& message, const GenericReq
 
     logging::Category& log = logging::Category::getInstance(SAML_LOGCAT".SecurityPolicyRule.BearerConfirmation");
 
-    const char* msg=NULL;
+    const char* msg="assertion is missing bearer SubjectConfirmation";
     const Subject* subject = a->getSubject();
     if (subject) {
         const vector<SubjectConfirmation*>& confs = subject->getSubjectConfirmations();
@@ -137,7 +139,7 @@ bool BearerConfirmationRule::evaluate(const XMLObject& message, const GenericReq
         }
     }
 
-    log.error(msg);
+    log.error(msg ? msg : "no error message");
     if (m_fatal)
         throw SecurityPolicyException("Unable to locate satisfiable bearer SubjectConfirmation in assertion.");
     return false;