In KeyLocator, added support for KeyName.
diff --git a/ndn-cpp/key-chain.cpp b/ndn-cpp/key-chain.cpp
index 9ab58fc..242617d 100644
--- a/ndn-cpp/key-chain.cpp
+++ b/ndn-cpp/key-chain.cpp
@@ -96,8 +96,11 @@
 {
   // Imitate BinaryXmlWireFormat::encodeData.
   struct ndn_NameComponent nameComponents[100];
+  struct ndn_NameComponent keyNameComponents[100];
   struct ndn_Data dataStruct;
-  ndn_Data_init(&dataStruct, nameComponents, sizeof(nameComponents) / sizeof(nameComponents[0]));
+  ndn_Data_init
+    (&dataStruct, nameComponents, sizeof(nameComponents) / sizeof(nameComponents[0]), 
+     keyNameComponents, sizeof(keyNameComponents) / sizeof(keyNameComponents[0]));
   data.get(dataStruct);
 
   BinaryXmlEncoder encoder;