**breaking change**: Switch Face and related classes to v2::KeyChain
security::v2::KeyChain is now exposed as ndn::KeyChain, which should
ensure that dependent code can be mostly compiled. However, expect code
that explicitly uses the old KeyChain interface to be broken.
Change-Id: I7330d0250d92f3f0f2570ab6d0214ab3dfdd18cc
Refs: #3098
diff --git a/src/mgmt/nfd/controller.cpp b/src/mgmt/nfd/controller.cpp
index 4ccb895..bfb0843 100644
--- a/src/mgmt/nfd/controller.cpp
+++ b/src/mgmt/nfd/controller.cpp
@@ -36,9 +36,10 @@
const uint32_t Controller::ERROR_LBOUND = 400;
ValidatorNull Controller::s_validatorNull;
-Controller::Controller(Face& face, security::v1::KeyChain& keyChain, Validator& validator)
+Controller::Controller(Face& face, KeyChain& keyChain, Validator& validator)
: m_face(face)
, m_keyChain(keyChain)
+ , m_signer(keyChain)
, m_validator(validator)
{
}
@@ -56,9 +57,8 @@
onFailure1 : [] (const ControlResponse&) {};
Name requestName = command->getRequestName(options.getPrefix(), parameters);
- Interest interest(requestName);
+ Interest interest = m_signer.makeCommandInterest(requestName, options.getSigningInfo());
interest.setInterestLifetime(options.getTimeout());
- m_keyChain.sign(interest, options.getSigningInfo());
m_face.expressInterest(interest,
[=] (const Interest&, const Data& data) {