24 #ifndef NDN_SECURITY_VALIDATOR_REGEX_HPP 25 #define NDN_SECURITY_VALIDATOR_REGEX_HPP 31 #include "../util/regex.hpp" 55 const int stepLimit = 3);
61 const int stepLimit = 3);
90 std::vector<shared_ptr<ValidationRequest> >& nextSteps);
97 std::vector<shared_ptr<ValidationRequest> >& nextSteps)
99 onValidationFailed(interest.shared_from_this(),
"No policy for signed interest checking");
104 const shared_ptr<const Data>& data,
110 const std::string& failureInfo,
111 const shared_ptr<const Data>& data,
118 typedef std::vector< shared_ptr<SecRuleRelative> >
RuleList;
130 #endif // NDN_SECURITY_VALIDATOR_REGEX_HPP
Copyright (c) 2011-2015 Regents of the University of California.
std::vector< shared_ptr< SecRuleRelative > > RuleList
void onCertificateValidationFailed(const shared_ptr< const Data > &signCertificate, const std::string &failureInfo, const shared_ptr< const Data > &data, const OnDataValidationFailed &onValidationFailed)
void onCertificateValidated(const shared_ptr< const Data > &signCertificate, const shared_ptr< const Data > &data, const OnDataValidated &onValidated, const OnDataValidationFailed &onValidationFailed)
shared_ptr< CertificateCache > m_certificateCache
virtual void checkPolicy(const Data &data, int nSteps, const OnDataValidated &onValidated, const OnDataValidationFailed &onValidationFailed, std::vector< shared_ptr< ValidationRequest > > &nextSteps)
Check the Data against policy and return the next validation step if necessary.
Error(const std::string &what)
represents an Interest packet
virtual ~ValidatorRegex()
function< void(const shared_ptr< const Data > &)> OnDataValidated
Callback to report a successful Data validation.
ValidatorRegex(Face *face=nullptr, shared_ptr< CertificateCache > certificateCache=DEFAULT_CERTIFICATE_CACHE, const int stepLimit=3)
std::vector< shared_ptr< Regex > > RegexList
static const shared_ptr< CertificateCache > DEFAULT_CERTIFICATE_CACHE
RuleList m_verifyPolicies
std::map< Name, shared_ptr< IdentityCertificate > > m_trustAnchors
function< void(const shared_ptr< const Data > &, const std::string &)> OnDataValidationFailed
Callback to report a failed Data validation.
Abstraction to communicate with local or remote NDN forwarder.
void addDataVerificationRule(shared_ptr< SecRuleRelative > rule)
Add a rule for data verification.
function< void(const shared_ptr< const Interest > &, const std::string &)> OnInterestValidationFailed
Callback to report a failed Interest validation.
void addTrustAnchor(shared_ptr< IdentityCertificate > certificate)
Add a trust anchor.
virtual void checkPolicy(const Interest &interest, int nSteps, const OnInterestValidated &onValidated, const OnInterestValidationFailed &onValidationFailed, std::vector< shared_ptr< ValidationRequest > > &nextSteps)
Check the Interest against validation policy and return the next validation step if necessary...
Validator is one of the main classes of the security library.
function< void(const shared_ptr< const Interest > &)> OnInterestValidated
Callback to report a successful Interest validation.
RuleList m_mustFailVerify