24 #ifndef NDN_SECURITY_VALIDATOR_REGEX_HPP 25 #define NDN_SECURITY_VALIDATOR_REGEX_HPP 31 #include "../util/regex.hpp" 56 const int stepLimit = 3);
62 const int stepLimit = 3);
91 std::vector<shared_ptr<ValidationRequest> >& nextSteps);
98 std::vector<shared_ptr<ValidationRequest> >& nextSteps)
100 onValidationFailed(interest.shared_from_this(),
"No policy for signed interest checking");
105 const shared_ptr<const Data>& data,
111 const std::string& failureInfo,
112 const shared_ptr<const Data>& data,
119 typedef std::vector< shared_ptr<SecRuleRelative> >
RuleList;
135 #endif // NDN_SECURITY_VALIDATOR_REGEX_HPP function< void(const shared_ptr< const Interest > &, const std::string &)> OnInterestValidationFailed
Callback to report a failed Interest validation.
Copyright (c) 2011-2015 Regents of the University of California.
RuleList m_mustFailVerify
RuleList m_verifyPolicies
void addDataVerificationRule(shared_ptr< SecRuleRelative > rule)
Add a rule for data verification.
represents an Interest packet
std::vector< shared_ptr< Regex > > RegexList
void addTrustAnchor(shared_ptr< v1::IdentityCertificate > certificate)
Add a trust anchor.
Error(const std::string &what)
function< void(const shared_ptr< const Data > &, const std::string &)> OnDataValidationFailed
Callback to report a failed Data validation.
function< void(const shared_ptr< const Data > &)> OnDataValidated
Callback to report a successful Data validation.
function< void(const shared_ptr< const Interest > &)> OnInterestValidated
Callback to report a successful Interest validation.
static const shared_ptr< CertificateCache > DEFAULT_CERTIFICATE_CACHE
virtual void checkPolicy(const Interest &interest, int nSteps, const OnInterestValidated &onValidated, const OnInterestValidationFailed &onValidationFailed, std::vector< shared_ptr< ValidationRequest > > &nextSteps)
virtual void checkPolicy(const Data &data, int nSteps, const OnDataValidated &onValidated, const OnDataValidationFailed &onValidationFailed, std::vector< shared_ptr< ValidationRequest > > &nextSteps)
virtual ~ValidatorRegex()
void onCertificateValidated(const shared_ptr< const Data > &signCertificate, const shared_ptr< const Data > &data, const OnDataValidated &onValidated, const OnDataValidationFailed &onValidationFailed)
std::vector< shared_ptr< SecRuleRelative > > RuleList
provides the interfaces for packet validation.
Provide a communication channel with local or remote NDN forwarder.
std::map< Name, shared_ptr< v1::IdentityCertificate > > m_trustAnchors
shared_ptr< CertificateCache > m_certificateCache
void onCertificateValidationFailed(const shared_ptr< const Data > &signCertificate, const std::string &failureInfo, const shared_ptr< const Data > &data, const OnDataValidationFailed &onValidationFailed)
ValidatorRegex(Face *face=nullptr, shared_ptr< CertificateCache > certificateCache=DEFAULT_CERTIFICATE_CACHE, const int stepLimit=3)