Bug #3435
closedDummyClientFace must allow custom KeyChain to be supplied during construction
100%
Description
Some test cases customize KeyChain (e.g., specialized TPM). DummyClientFace creates an instance of a "default" KeyChain, which potentially causes errors like this:
../src/security/key-chain.cpp:264: fatal error: in "void ndn::security::KeyChain::initialize(const std::string &, const std::string &, bool)": boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<ndn::security::KeyChain::MismatchError> >: TPM locator supplied does not match TPM locator in PIB: tpm-file: != tpm-osxkeychain:
The current workaround is to customize $HOME
for the test case(s) and create client.conf
in $HOME/.ndn/
Updated by Alex Afanasyev over 8 years ago
- Category set to Utils
- Status changed from New to Code review
- Assignee set to Alex Afanasyev
- Target version set to v0.5
- % Done changed from 0 to 100
Updated by Alex Afanasyev over 8 years ago
Updated by Junxiao Shi over 8 years ago
Should we require KeyChain
in all DummyClientFace
constructors?
The default KeyChain
would be used without specifying a KeyChain
, which can potentially cause errors.
A counterargument is that, eventually we can use memory-backed PIB and TPM when no KeyChain
is passed, so that no test case would rely on default KeyChain
.
Updated by Alex Afanasyev over 8 years ago
May be, but we cannot simply remove other constructors as of yet.
We could deprecate other constructors and then remove them (and refactor code a bit) after all dependent projects stop using the old constructors.
Even with memory-backed PIB/TPM, I would still explicitly use the specified KeyChain.
Updated by Alex Afanasyev over 8 years ago
- Status changed from Code review to Closed