Convert ENDLINE refs to eol.
[shibboleth/opensaml2.git] / saml / binding / impl / MessageFlowRule.cpp
index 1b19ae1..45722fa 100644 (file)
 #include "exceptions.h"
 #include "binding/SecurityPolicyRule.h"
 
-#include <log4cpp/Category.hh>
+#include <xmltooling/logging.h>
 #include <xmltooling/util/ReplayCache.h>
 #include <xercesc/util/XMLUniDefs.hpp>
 
 using namespace opensaml;
+using namespace xmltooling::logging;
 using namespace xmltooling;
-using namespace log4cpp;
 using namespace std;
 
 namespace opensaml {
@@ -40,7 +40,10 @@ namespace opensaml {
         MessageFlowRule(const DOMElement* e);
         virtual ~MessageFlowRule() {}
         
-        void evaluate(const xmltooling::XMLObject& message, const GenericRequest* request, SecurityPolicy& policy) const;
+        const char* getType() const {
+            return MESSAGEFLOW_POLICY_RULE;
+        }
+        void evaluate(const XMLObject& message, const GenericRequest* request, SecurityPolicy& policy) const;
     
     private:
         bool m_checkReplay;
@@ -83,12 +86,12 @@ void MessageFlowRule::evaluate(const XMLObject& message, const GenericRequest* r
     else {
         if (issueInstant > now + skew) {
             log.errorStream() << "rejected not-yet-valid message, timestamp (" << issueInstant <<
-                "), newest allowed (" << now + skew << ")" << CategoryStream::ENDLINE;
+                "), newest allowed (" << now + skew << ")" << logging::eol;
             throw SecurityPolicyException("Message rejected, was issued in the future.");
         }
         else if (issueInstant < now - skew - m_expires) {
             log.errorStream() << "rejected expired message, timestamp (" << issueInstant <<
-                "), oldest allowed (" << (now - skew - m_expires) << ")" << CategoryStream::ENDLINE;
+                "), oldest allowed (" << (now - skew - m_expires) << ")" << logging::eol;
             throw SecurityPolicyException("Message expired, was issued too long ago.");
         }
     }