change PROBE format for max-suffix-length for each suggested name
Change-Id: Ie0823963fd3c56e40d825e0e80dfadf164f08ca3
diff --git a/tools/ndncert-client.cpp b/tools/ndncert-client.cpp
index d948854..50af81e 100644
--- a/tools/ndncert-client.cpp
+++ b/tools/ndncert-client.cpp
@@ -238,7 +238,7 @@
static void
probeCb(const Data& reply, CaProfile profile)
{
- std::vector<Name> names;
+ std::vector<std::pair<Name, int>> names;
std::vector<Name> redirects;
Requester::onProbeResponse(reply, profile, names, redirects);
size_t count = 0;
@@ -247,7 +247,8 @@
<< ": You can either select one of the following names suggested by the CA: " << std::endl;
for (const auto& name : names) {
std::cerr << "> Index: " << count++ << std::endl
- << ">> Suggested name: " << name.toUri() << std::endl;
+ << ">> Suggested name: " << name.first.toUri() << std::endl
+ << ">> Corresponding Max sufiix length: " << name.second << std::endl;
}
std::cerr << "\nOr choose another trusted CA suggested by the CA: " << std::endl;
for (const auto& redirect : redirects) {
@@ -271,8 +272,9 @@
}
if (index < names.size()) {
//names
- std::cerr << "You selected name: " << names[index].toUri() << std::endl;
- runNew(profile, names[index]);
+ std::cerr << "You selected name: " << names[index].first.toUri() << std::endl;
+ //TODO add prompt to "add suffix"
+ runNew(profile, names[index].first);
}
else {
//redirects