security: Fix a bug of Validator, making checkPolicy methods pure abstract
This commit also includes fixes to unit tests.
Change-Id: If92569fc9dabaa08714d458e5195b6a83acb8701
diff --git a/src/security/validator-null.hpp b/src/security/validator-null.hpp
index 90b5293..27dc63d 100644
--- a/src/security/validator-null.hpp
+++ b/src/security/validator-null.hpp
@@ -14,22 +14,22 @@
namespace ndn {
class ValidatorNull : public Validator {
-protected:
-
+public:
virtual
~ValidatorNull()
{}
-
+
+protected:
virtual void
- checkPolicy (shared_ptr<const Data> data,
+ checkPolicy (const shared_ptr<const Data>& data,
int stepCount,
const OnDataValidated &onValidated,
const OnDataValidationFailed &onValidationFailed,
std::vector<shared_ptr<ValidationRequest> > &nextSteps)
{ onValidated(data); }
-
+
virtual void
- checkPolicy (shared_ptr<const Interest> interest,
+ checkPolicy (const shared_ptr<const Interest>& interest,
int stepCount,
const OnInterestValidated &onValidated,
const OnInterestValidationFailed &onValidationFailed,