31 if (!state->getOutcome()) {
46 "Data " + data.
getName().toUri() +
" signed by " + klName.
toUri()});
50 continueValidation(make_shared<CertificateRequest>(klName), state);
58 if (!state->getOutcome()) {
62 if (!state->getOutcome()) {
77 "Interest " + interest.
getName().toUri() +
" signed by " + klName.
toUri()});
81 continueValidation(make_shared<CertificateRequest>(klName), state);
Represents a Data packet.
const SignatureInfo & getSignatureInfo() const noexcept
Get the SignatureInfo element.
const Name & getName() const noexcept
Get the Data name.
Represents an Interest packet.
const Name & getName() const noexcept
Get the Interest name.
Represents an absolute name.
void toUri(std::ostream &os, name::UriFormat format=name::UriFormat::DEFAULT) const
Write URI representation of the name to the output stream.
bool isPrefixOf(const Name &other) const noexcept
Check if this name is a prefix of another name.
@ INVALID_KEY_LOCATOR
The KeyLocator element is missing or has an invalid format.
@ POLICY_ERROR
The packet violates the validation rules enforced by the policy.
void checkPolicy(const Data &data, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation) override
Check data against the policy.
std::function< void(const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state)> ValidationContinuation
Contains the ndn-cxx security framework.
Name extractIdentityNameFromKeyLocator(const Name &keyLocator)
Extract identity name from key, version-less certificate, or certificate name.
SignatureInfo getSignatureInfo(const Interest &interest, ValidationState &state)
Extract SignatureInfo from a signed Interest.
Name getKeyLocatorName(const SignatureInfo &si, ValidationState &state)
Extract the KeyLocator name from a SignatureInfo element.