22 #ifndef NDN_CXX_SECURITY_VALIDATION_STATE_HPP 23 #define NDN_CXX_SECURITY_VALIDATION_STATE_HPP 32 #include <unordered_set> 33 #include <boost/logic/tribool.hpp> 116 verifyOriginalPacket(
const optional<Certificate>& trustedCert) = 0;
122 bypassValidation() = 0;
139 verifyCertificateChain(
const Certificate& trustedCert);
145 std::unordered_set<Name> m_seenCertificateNames;
153 std::list<Certificate> m_certificateChain;
189 getOriginalData()
const;
193 verifyOriginalPacket(
const optional<Certificate>& trustedCert)
final;
196 bypassValidation()
final;
235 getOriginalInterest()
const;
242 verifyOriginalPacket(
const optional<Certificate>& trustedCert)
final;
245 bypassValidation() final;
259 #endif // NDN_CXX_SECURITY_VALIDATION_STATE_HPP ValidationState()
Create validation state.
Copyright (c) 2011-2015 Regents of the University of California.
Represents an NDN certificate following the version 2.0 format.
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.