Project

General

Profile

Actions

Bug #4062

closed

KeyImpl doc comment is wrong

Added by Anonymous over 7 years ago. Updated over 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

Also available in: Atom PDF