Project

General

Profile

Bug #4062

Updated by Anonymous over 7 years ago

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

Back