Bug #4062
closedKeyImpl doc comment is wrong
100%
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
Updated by Davide Pesavento over 7 years ago
- Category set to Security
- Target version set to v0.6
- Start date deleted (
04/20/2017)
Updated by Anonymous over 7 years ago
- Description updated (diff)
Added a similar remark for setDefaultCertificate.
Updated by Davide Pesavento over 7 years ago
- Status changed from New to Code review
- Assignee set to Davide Pesavento
- % Done changed from 0 to 100
Updated by Davide Pesavento over 7 years ago
- Status changed from Code review to Closed