33 return state->fail({ValidationError::Code::INVALID_KEY_LOCATOR,
"Required key locator is missing"});
37 return state->fail({ValidationError::Code::INVALID_KEY_LOCATOR,
"Key locator not Name"});
40 continueValidation(make_shared<CertificateRequest>(
Interest(locator.
getName())), state);
43 state->fail({ValidationError::Code::INVALID_KEY_LOCATOR,
"Data signing policy violation for " +
57 return state->fail({ValidationError::Code::INVALID_KEY_LOCATOR,
"Invalid signed interest (" +
58 std::string(e.what()) +
")"});
61 return state->fail({ValidationError::Code::INVALID_KEY_LOCATOR,
"Required key locator is missing"});
65 return state->fail({ValidationError::Code::INVALID_KEY_LOCATOR,
"Key locator not Name"});
68 continueValidation(make_shared<CertificateRequest>(
Interest(locator.
getName())), state);
71 state->fail({ValidationError::Code::INVALID_KEY_LOCATOR,
"Interest signing policy violation for " +
const Name & getName() const
Copyright (c) 2013-2016 Regents of the University of California.
bool hasKeyLocator() const
Check if SignatureInfo block has a KeyLocator.
const KeyLocator & getKeyLocator() const
Get KeyLocator.
represents an Interest packet
indicates KeyLocator contains a Name
const KeyLocator & getKeyLocator() const
Get KeyLocator.
const Name & getName() const
Get name of the Data packet.
std::string toUri() const
Encode this name as a URI.
const Name & getName() const
get Name element
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
Block blockFromValue() const
const Signature & getSignature() const
void wireDecode(const Block &wire)
Decode from a wire format.
const ssize_t POS_SIG_INFO
bool hasKeyLocator() const
Check if KeyLocator is set.
bool isPrefixOf(const Name &name) const
Check if the N components of this name are the same as the first N components of the given name...
PartialName getPrefix(ssize_t nComponents) const
Extract a prefix (PartialName) of the name, containing first nComponents components.
const Component & at(ssize_t i) const
Get component at the specified index.
represents an error in TLV encoding or decoding