Project

General

Profile

Actions

Bug #4062

closed

KeyImpl doc comment is wrong

Added by Anonymous about 7 years ago. Updated almost 7 years ago.

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

100%

Estimated time:

Description

The doc comment for the first KeyImpl constructor says "@throw Pib::Error a key with the same @p keyName already exists."
https://github.com/named-data/ndn-cxx/blob/a10b2ffb39cb179dc696b1a585c083f865e3bd09/src/security/pib/detail/key-impl.hpp#L57

I believe this is a mistake. Instead it should say "If a key with the same keyName already exists, overwrite it." It looks like the unit test confirms this:
https://github.com/named-data/ndn-cxx/blob/a10b2ffb39cb179dc696b1a585c083f865e3bd09/tests/unit-tests/security/pib/detail/key-impl.t.cpp#L147

KeyImpl(id1Key1Name, id1Key2.buf(), id1Key2.size(), pibImpl); // overwriting of the key should work

Similarly, the doc comment for setDefaultCertificate says "@throw Pib::Error the certificate with the same name already exists." I think this is a mistake too since addCertificate does not throw the error.
https://github.com/named-data/ndn-cxx/blob/a10b2ffb39cb179dc696b1a585c083f865e3bd09/src/security/pib/detail/key-impl.hpp#L149

Actions #1

Updated by Davide Pesavento about 7 years ago

  • Category set to Security
  • Target version set to v0.6
  • Start date deleted (04/20/2017)
Actions #2

Updated by Anonymous about 7 years ago

  • Description updated (diff)

Added a similar remark for setDefaultCertificate.

Actions #3

Updated by Davide Pesavento almost 7 years ago

  • Status changed from New to Code review
  • Assignee set to Davide Pesavento
  • % Done changed from 0 to 100
Actions #4

Updated by Davide Pesavento almost 7 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF