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-regex.hpp b/src/security/validator-regex.hpp
index e080ddf..a06964c 100644
--- a/src/security/validator-regex.hpp
+++ b/src/security/validator-regex.hpp
@@ -51,12 +51,20 @@
protected:
virtual void
- checkPolicy (const 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);
+ virtual void
+ checkPolicy (const shared_ptr<const Interest>& interest,
+ int stepCount,
+ const OnInterestValidated &onValidated,
+ const OnInterestValidationFailed &onValidationFailed,
+ std::vector<shared_ptr<ValidationRequest> > &nextSteps)
+ { onValidationFailed(interest); }
+
void
onCertificateValidated(const shared_ptr<const Data> &signCertificate,
const shared_ptr<const Data> &data,