Prepare for testbed deployment: update ndncert-client
Change-Id: I0a84e2ebb913166b5fbdb16fdc0938862ba42a22
diff --git a/tests/unit-tests/bench.t.cpp b/tests/unit-tests/bench.t.cpp
index d2a852c..a8098e4 100644
--- a/tests/unit-tests/bench.t.cpp
+++ b/tests/unit-tests/bench.t.cpp
@@ -102,10 +102,9 @@
item.caPrefix = Name("/ndn");
item.cert = std::make_shared<Certificate>(cert);
requester::Request state(m_keyChain, item, RequestType::NEW);
- auto newInterest = state.genNewInterest(Name("/ndn/alice"),
+ auto newInterest = state.genNewInterest(addIdentity(Name("/ndn/alice")).getDefaultKey().getName(),
time::system_clock::now(),
time::system_clock::now() + time::days(1));
-
// std::cout << "New Interest Size: " << newInterest->wireEncode().size() << std::endl;
// generate CHALLENGE Interest
diff --git a/tests/unit-tests/ca-module.t.cpp b/tests/unit-tests/ca-module.t.cpp
index 4e306ba..73a722f 100644
--- a/tests/unit-tests/ca-module.t.cpp
+++ b/tests/unit-tests/ca-module.t.cpp
@@ -223,7 +223,7 @@
item.caPrefix = Name("/ndn");
item.cert = std::make_shared<Certificate>(cert);
requester::Request state(m_keyChain, item, RequestType::NEW);
- auto interest = state.genNewInterest(Name("/ndn/zhiyi"),
+ auto interest = state.genNewInterest(addIdentity(Name("/ndn/zhiyi")).getDefaultKey().getName(),
time::system_clock::now(),
time::system_clock::now() + time::days(1));
@@ -274,10 +274,12 @@
item.caPrefix = Name("/ndn");
item.cert = std::make_shared<Certificate>(cert);
requester::Request state(m_keyChain, item, RequestType::NEW);
+ auto client = addIdentity(Name("/ndn/zhiyi"));
auto current_tp = time::system_clock::now();
- auto interest1 = state.genNewInterest(Name("/ndn/zhiyi"), current_tp, current_tp - time::hours(1));
- auto interest2 = state.genNewInterest(Name("/ndn/zhiyi"), current_tp, current_tp + time::days(361));
- auto interest3 = state.genNewInterest(Name("/ndn/zhiyi"), current_tp - time::hours(1), current_tp + time::hours(2));
+ auto interest1 = state.genNewInterest(client.getDefaultKey().getName(), current_tp, current_tp - time::hours(1));
+ auto interest2 = state.genNewInterest(client.getDefaultKey().getName(), current_tp, current_tp + time::days(361));
+ auto interest3 = state.genNewInterest(client.getDefaultKey().getName(),
+ current_tp - time::hours(1), current_tp + time::hours(2));
face.onSendData.connect([&](const Data& response) {
auto contentTlv = response.getContent();
contentTlv.parse();
@@ -315,7 +317,7 @@
item.caPrefix = Name("/ndn");
item.cert = std::make_shared<Certificate>(cert);
requester::Request state(m_keyChain, item, RequestType::NEW);
- auto interest = state.genNewInterest(Name("/ndn/zhiyi"),
+ auto interest = state.genNewInterest(addIdentity(Name("/ndn/zhiyi")).getDefaultKey().getName(),
time::system_clock::now(),
time::system_clock::now() + time::days(1));
@@ -348,11 +350,11 @@
item.cert = std::make_shared<Certificate>(cert);
requester::Request state(m_keyChain, item, RequestType::NEW);
- auto interest1 = state.genNewInterest(Name("/ndn/a"), time::system_clock::now(),
+ auto interest1 = state.genNewInterest(addIdentity(Name("/ndn/a")).getDefaultKey().getName(), time::system_clock::now(),
time::system_clock::now() + time::days(1));
- auto interest2 = state.genNewInterest(Name("/ndn/a/b"), time::system_clock::now(),
+ auto interest2 = state.genNewInterest(addIdentity(Name("/ndn/a/b")).getDefaultKey().getName(), time::system_clock::now(),
time::system_clock::now() + time::days(1));
- auto interest3 = state.genNewInterest(Name("/ndn/a/b/c/d"), time::system_clock::now(),
+ auto interest3 = state.genNewInterest(addIdentity(Name("/ndn/a/b/c/d")).getDefaultKey().getName(), time::system_clock::now(),
time::system_clock::now() + time::days(1));
face.onSendData.connect([&](const Data& response) {
@@ -389,8 +391,9 @@
requester::Request state(m_keyChain, item, RequestType::NEW);
auto current_tp = time::system_clock::now();
- auto interest1 = state.genNewInterest(Name("/ndn"), current_tp, current_tp + time::days(1));
- auto interest2 = state.genNewInterest(Name("/ndn/a/b/c/d"), current_tp, current_tp + time::days(1));
+ auto interest1 = state.genNewInterest(identity.getDefaultKey().getName(), current_tp, current_tp + time::days(1));
+ auto interest2 = state.genNewInterest(addIdentity(Name("/ndn/a/b/c/d")).getDefaultKey().getName(),
+ current_tp, current_tp + time::days(1));
face.onSendData.connect([&](const Data& response) {
auto contentTlv = response.getContent();
contentTlv.parse();
@@ -419,7 +422,7 @@
item.cert = std::make_shared<Certificate>(cert);
requester::Request state(m_keyChain, item, RequestType::NEW);
- auto newInterest = state.genNewInterest(Name("/ndn/zhiyi"), time::system_clock::now(),
+ auto newInterest = state.genNewInterest(addIdentity(Name("/ndn/zhiyi")).getDefaultKey().getName(), time::system_clock::now(),
time::system_clock::now() + time::days(1));
// generate CHALLENGE Interest