22 #ifndef NDN_CXX_SECURITY_VALIDATION_POLICY_HPP 23 #define NDN_CXX_SECURITY_VALIDATION_POLICY_HPP 41 const shared_ptr<ValidationState>& state)>;
101 checkPolicy(
const Data& data,
const shared_ptr<ValidationState>& state,
142 checkPolicy(static_cast<const Data&>(certificate), state, continueValidation);
183 #endif // NDN_CXX_SECURITY_VALIDATION_POLICY_HPP void setInnerPolicy(unique_ptr< ValidationPolicy > innerPolicy)
Set inner policy.
Copyright (c) 2011-2015 Regents of the University of California.
Represents an NDN certificate following the version 2.0 format.
virtual ~ValidationPolicy()=default
void setValidator(Validator &validator)
Set validator to which the policy is associated.
Name extractIdentityNameFromKeyLocator(const Name &keyLocator)
Extract identity name from key, version-less certificate, or certificate name.
Represents an Interest packet.
ValidationPolicy & getInnerPolicy()
Return the inner policy.
Abstraction that implements validation policy for Data and Interest packets.
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED
unique_ptr< ValidationPolicy > m_innerPolicy
std::function< void(const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state)> ValidationContinuation
static Name getKeyLocatorName(const SignatureInfo &si, ValidationState &state)
Represents an absolute name.
bool hasInnerPolicy() const
Check if inner policy is set.
virtual void checkPolicy(const Data &data, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation)=0
Check data against the policy.
virtual void checkPolicy(const Certificate &certificate, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation)
Check certificate against the policy.
Represents a Data packet.
Interface for validating data and interest packets.