22 #ifndef NDN_SECURITY_VALIDATION_STATE_HPP 23 #define NDN_SECURITY_VALIDATION_STATE_HPP 32 #include <unordered_set> 33 #include <boost/logic/tribool.hpp> 114 verifyOriginalPacket(
const Certificate& trustedCert) = 0;
120 bypassValidation() = 0;
137 verifyCertificateChain(
const Certificate& trustedCert);
143 std::unordered_set<Name> m_seenCertificateNames;
151 std::list<v2::Certificate> m_certificateChain;
187 getOriginalData()
const;
191 verifyOriginalPacket(
const Certificate& trustedCert)
final;
194 bypassValidation()
final;
233 getOriginalInterest()
const;
240 verifyOriginalPacket(
const Certificate& trustedCert)
final;
243 bypassValidation() final;
257 #endif // NDN_SECURITY_VALIDATION_STATE_HPP ValidationState()
Create validation state.
The certificate following the certificate format naming convention.
function< void(const Data &data)> DataValidationSuccessCallback
Callback to report a successful Data validation.
bool hasSeenCertificateName(const Name &certName)
Check if certName has been previously seen and record the supplied name.
Base class to store tag information (e.g., inside Interest and Data packets)
void addCertificate(const Certificate &cert)
Add cert to the top of the certificate chain.
Represents an Interest packet.
function< void(const Data &data, const ValidationError &error)> DataValidationFailureCallback
Callback to report a failed Data validation.
provides a lightweight signal / event system
Validation state for a data packet.
boost::logic::tribool getOutcome() const
provides a tag type for simple types
Validation state for an interest packet.
virtual ~ValidationState()
util::Signal< InterestValidationState, Interest > afterSuccess
Represents an absolute name.
function< void(const Interest &interest, const ValidationError &error)> InterestValidationFailureCallback
Callback to report a failed Interest validation.
Validation error code and optional detailed error message.
virtual void fail(const ValidationError &error)=0
Call the failure callback.
Represents a Data packet.
boost::logic::tribool m_outcome
function< void(const Interest &interest)> InterestValidationSuccessCallback
Callback to report a successful Interest validation.
Interface for validating data and interest packets.