Project

General

Profile

Actions

Bug #4390

closed

Documentation error in ValidationPolicy::checkPolicy

Added by Anonymous about 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Security
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

The documentation for the call to continueValidation in ValidationPolicy::checkPolicy says:
https://github.com/named-data/ndn-cxx/blob/e5a19b8d8631c3b2b8a9bd28502d08cad61f743a/src/security/v2/validation-policy.hpp#L100

* - If packet conforms to the policy and no further key retrievals are necessary,
*   the policy should call continueValidation(state, nullptr)
* - If packet conforms to the policy and a key needs to be fetched, the policy should call
*   continueValidation(state, <appropriate-key-request-instance>)

But in ValidationContinuation, the request argument comes first:
https://github.com/named-data/ndn-cxx/blob/e5a19b8d8631c3b2b8a9bd28502d08cad61f743a/src/security/v2/validation-policy.hpp#L40

using ValidationContinuation = std::function<void(const shared_ptr<CertificateRequest>& certRequest,
                                                  const shared_ptr<ValidationState>& state)>;

Therefore the documentation for the call to continueValidation should reverse the arguments:

* - If packet conforms to the policy and no further key retrievals are necessary,
*   the policy should call continueValidation(nullptr, state)
* - If packet conforms to the policy and a key needs to be fetched, the policy should call
*   continueValidation(<appropriate-key-request-instance>, state)

The same should be fixed in the documentation for checkPolicy(Interest) and checkPolicy(Certificate).
https://github.com/named-data/ndn-cxx/blob/e5a19b8d8631c3b2b8a9bd28502d08cad61f743a/src/security/v2/validation-policy.hpp#L118
https://github.com/named-data/ndn-cxx/blob/e5a19b8d8631c3b2b8a9bd28502d08cad61f743a/src/security/v2/validation-policy.hpp#L138

Actions #1

Updated by Junxiao Shi over 6 years ago

  • Category set to Security
  • Status changed from New to Code review
  • Assignee set to Junxiao Shi
  • Target version set to v0.7
  • % Done changed from 0 to 100
Actions #2

Updated by Davide Pesavento over 6 years ago

  • Status changed from Code review to Closed
  • Start date deleted (11/28/2017)
Actions

Also available in: Atom PDF