Bug #2080
closed
examples/producer: certificate does not exist
Added by Junxiao Shi about 10 years ago.
Updated about 10 years ago.
Description
Steps to reproduce:
rm -rf $HOME/.ndn
build/examples/producer
Expected: ERROR: error while connecting to the forwarder (No such file or directory)
Actual: ERROR: SecPublicInfoSqlite3::getCertificate certificate does not exist
This is a regression caused by commit 6a90f37ebab99764d8d3f7fd8dcae4ff286eb8ee.
Files
- Status changed from New to In Progress
I'm pretty sure this problem is related to
This commit also removes a deprecated feature in ndn::nfd::Controller::start(
ControlParameter, CommandSuccessCallback, CommandFailCallback,
IdentityCertificate, time::milliseconds), where empty IdentityCertificate()
was previously acceptable as the fourth parameter to pick the default
certificate, but now it's interpreted as a certificate with empty Name.
I have checked NFD, but I didn't check ndn-cxx itself.
And ndn::Face
is relying on this feature.
After all, that code wasn't deprecated (I don't even remember why we marked it deprecated).
We either revert the change or the change in the attached patch fixes the problem. Without the fix, as of the commit:6a90f37ebab99764d8d3f7fd8dcae4ff286eb8ee, all apps that are based on ndn-cxx would fail, not just example.
Also. To reproduce the error, you don't need to remove ~/.ndn
. The error is related to a bug of using any "default" certificate during prefix registration, not about the missing default cert.
I'm not going to put that patch back to nfd-controller.hpp
. An IdentityCertificate with empty Name is a valid identity certificate. I'm changing face.hpp
to call the correct overload (but this seems tricky).
Actually, this is not true. IdentityCertificate with empty name is an invalid certificate! A valid IdentityCertificate has at least 4 name components, as it must follow <...>/KEY/<...>/<key-id>/ID-CERT/<version>
.
Identity's name can be empty and this was the reason I have put default parameter to IdentityCertificate version of the registerPrefix.
Do not introduce more complexity in already complex code. A simple fix would be enough.
- Assignee changed from Junxiao Shi to Alex Afanasyev
OK, I'll let Alex do the fix. Please be sure to add a comment with the reasoning in note-5.
I figured out how to use boost::mpl::if_
to select the other overload, but I can't figure out how to bind
to it.
- Status changed from In Progress to Code review
Change is not properly uploaded. If it is indeed uploaded, please paste Change-Id line here.
- Status changed from Code review to Closed
- % Done changed from 0 to 100
Also available in: Atom
PDF