tools: include the key name in keylocator as the NFD id in nfd-status

refs #1807

Change-Id: I28f17c459efb720f957f33a6fc27a55edde719ea
diff --git a/tools/nfd-status.cpp b/tools/nfd-status.cpp
index 3262a28..219e53d 100644
--- a/tools/nfd-status.cpp
+++ b/tools/nfd-status.cpp
@@ -184,9 +184,20 @@
   afterFetchedVersionInformation(const Data& data)
   {
     nfd::ForwarderStatus status(data.getContent());
+    std::string nfdId;
+    if (data.getSignature().hasKeyLocator())
+      {
+        const ndn::KeyLocator& locator = data.getSignature().getKeyLocator();
+        if (locator.getType() == KeyLocator::KeyLocator_Name)
+          nfdId = locator.getName().toUri();
+        //todo: KeyDigest supporting
+      }
+
     if (m_isOutputXml)
       {
         std::cout << "<generalStatus>";
+        std::cout << "<nfdId>"
+                  << nfdId << "</nfdId>";
         std::cout << "<version>"
                   << status.getNfdVersion() << "</version>";
         std::cout << "<startTime>"
@@ -228,6 +239,8 @@
     else
       {
         std::cout << "General NFD status:" << std::endl;
+        std::cout << "                 nfdId="
+                  << nfdId << std::endl;
         std::cout << "               version="
                   << status.getNfdVersion() << std::endl;
         std::cout << "             startTime="