diff --git a/ndn-cpp/c/data.h b/ndn-cpp/c/data.h
index e8b2bf1..0226919 100644
--- a/ndn-cpp/c/data.h
+++ b/ndn-cpp/c/data.h
@@ -42,7 +42,7 @@
   ndn_ContentType_NACK = 5
 } ndn_ContentType;
 
-struct ndn_SignedInfo {
+struct ndn_MetaInfo {
   struct ndn_PublisherPublicKeyDigest publisherPublicKeyDigest;
   double timestampMilliseconds;    /**< milliseconds since 1/1/1970. -1 for none */
   ndn_ContentType type;            /**< default is ndn_ContentType_DATA. -1 for none */
@@ -53,13 +53,13 @@
 };
 
 /**
- * Initialize the ndn_SignedInfo struct with values for none and the type to the default ndn_ContentType_DATA.
- * @param self A pointer to the ndn_SignedInfo struct.
+ * Initialize the ndn_MetaInfo struct with values for none and the type to the default ndn_ContentType_DATA.
+ * @param self A pointer to the ndn_MetaInfo struct.
  * @param keyNameComponents The pre-allocated array of ndn_NameComponent for the keyLocator.
  * @param maxKeyNameComponents The number of elements in the allocated keyNameComponents array.
  */
-static inline void ndn_SignedInfo_initialize
-  (struct ndn_SignedInfo *self, struct ndn_NameComponent *keyNameComponents, unsigned int maxKeyNameComponents) {
+static inline void ndn_MetaInfo_initialize
+  (struct ndn_MetaInfo *self, struct ndn_NameComponent *keyNameComponents, unsigned int maxKeyNameComponents) {
   ndn_PublisherPublicKeyDigest_initialize(&self->publisherPublicKeyDigest);
   self->type = ndn_ContentType_DATA;
   self->freshnessSeconds = -1;
@@ -71,7 +71,7 @@
 struct ndn_Data {
   struct ndn_Signature signature;
   struct ndn_Name name;
-  struct ndn_SignedInfo signedInfo;
+  struct ndn_MetaInfo metaInfo;
   unsigned char *content;     /**< pointer to the content */
   unsigned int contentLength; /**< length of content */
 };
@@ -82,7 +82,7 @@
  * @param self A pointer to the ndn_Data struct.
  * @param nameComponents The pre-allocated array of ndn_NameComponent.
  * @param maxNameComponents The number of elements in the allocated nameComponents array.
- * @param keyNameComponents The pre-allocated array of ndn_NameComponent for the signedInfo.keyLocator.
+ * @param keyNameComponents The pre-allocated array of ndn_NameComponent for the metaInfo.keyLocator.
  * @param maxKeyNameComponents The number of elements in the allocated keyNameComponents array.
  */
 static inline void ndn_Data_initialize
@@ -91,7 +91,7 @@
 {
   ndn_Signature_initialize(&self->signature);
   ndn_Name_initialize(&self->name, nameComponents, maxNameComponents);
-  ndn_SignedInfo_initialize(&self->signedInfo, keyNameComponents, maxKeyNameComponents);
+  ndn_MetaInfo_initialize(&self->metaInfo, keyNameComponents, maxKeyNameComponents);
   self->content = 0;
   self->contentLength = 0;
 }
diff --git a/ndn-cpp/c/encoding/binary-xml-data.c b/ndn-cpp/c/encoding/binary-xml-data.c
index 31354d4..ebc9987 100644
--- a/ndn-cpp/c/encoding/binary-xml-data.c
+++ b/ndn-cpp/c/encoding/binary-xml-data.c
@@ -56,9 +56,9 @@
   return NDN_ERROR_success;
 }
 
-static ndn_Error encodeSignedInfo(struct ndn_SignedInfo *signedInfo, struct ndn_BinaryXmlEncoder *encoder)
+static ndn_Error encodeSignedInfo(struct ndn_MetaInfo *metaInfo, struct ndn_BinaryXmlEncoder *encoder)
 {
-  if (signedInfo->type < 0)
+  if (metaInfo->type < 0)
     return NDN_ERROR_success;
 
   ndn_Error error;
@@ -66,26 +66,26 @@
     return error;
 
   // This will skip encoding if there is no publisherPublicKeyDigest.
-  if ((error = ndn_encodeBinaryXmlPublisherPublicKeyDigest(&signedInfo->publisherPublicKeyDigest, encoder)))
+  if ((error = ndn_encodeBinaryXmlPublisherPublicKeyDigest(&metaInfo->publisherPublicKeyDigest, encoder)))
     return error;
   
   if ((error = ndn_BinaryXmlEncoder_writeOptionalTimeMillisecondsDTagElement
-      (encoder, ndn_BinaryXml_DTag_Timestamp, signedInfo->timestampMilliseconds)))
+      (encoder, ndn_BinaryXml_DTag_Timestamp, metaInfo->timestampMilliseconds)))
     return error;
   
-  if (!(signedInfo->type < 0 || signedInfo->type == ndn_ContentType_DATA)) {
+  if (!(metaInfo->type < 0 || metaInfo->type == ndn_ContentType_DATA)) {
     // Not the default of DATA, so we need to encode the type.
     unsigned char *typeBytes;
     unsigned int typeBytesLength = 3;
-    if (signedInfo->type == ndn_ContentType_ENCR)
+    if (metaInfo->type == ndn_ContentType_ENCR)
       typeBytes = "\x10\xD0\x91";
-    else if (signedInfo->type == ndn_ContentType_GONE)
+    else if (metaInfo->type == ndn_ContentType_GONE)
       typeBytes = "\x18\xE3\x44";
-    else if (signedInfo->type == ndn_ContentType_KEY)
+    else if (metaInfo->type == ndn_ContentType_KEY)
       typeBytes = "\x28\x46\x3F";
-    else if (signedInfo->type == ndn_ContentType_LINK)
+    else if (metaInfo->type == ndn_ContentType_LINK)
       typeBytes = "\x2C\x83\x4A";
-    else if (signedInfo->type == ndn_ContentType_NACK)
+    else if (metaInfo->type == ndn_ContentType_NACK)
       typeBytes = "\x34\x00\x8A";
     else
       return NDN_ERROR_unrecognized_ndn_ContentType;
@@ -96,15 +96,15 @@
   }
   
   if ((error = ndn_BinaryXmlEncoder_writeOptionalUnsignedDecimalIntDTagElement
-      (encoder, ndn_BinaryXml_DTag_FreshnessSeconds, signedInfo->freshnessSeconds)))
+      (encoder, ndn_BinaryXml_DTag_FreshnessSeconds, metaInfo->freshnessSeconds)))
     return error;
   
   if ((error = ndn_BinaryXmlEncoder_writeOptionalBlobDTagElement
-      (encoder, ndn_BinaryXml_DTag_FinalBlockID, signedInfo->finalBlockID, signedInfo->finalBlockIDLength)))
+      (encoder, ndn_BinaryXml_DTag_FinalBlockID, metaInfo->finalBlockID, metaInfo->finalBlockIDLength)))
     return error;
  
   // This will skip encoding if there is no key locator.
-  if ((error = ndn_encodeBinaryXmlKeyLocator(&signedInfo->keyLocator, encoder)))
+  if ((error = ndn_encodeBinaryXmlKeyLocator(&metaInfo->keyLocator, encoder)))
     return error;
   
   if ((error = ndn_BinaryXmlEncoder_writeElementClose(encoder)))
@@ -113,17 +113,17 @@
   return NDN_ERROR_success;  
 }
 
-static ndn_Error decodeSignedInfo(struct ndn_SignedInfo *signedInfo, struct ndn_BinaryXmlDecoder *decoder)
+static ndn_Error decodeSignedInfo(struct ndn_MetaInfo *metaInfo, struct ndn_BinaryXmlDecoder *decoder)
 {
   ndn_Error error;
   if ((error = ndn_BinaryXmlDecoder_readElementStartDTag(decoder, ndn_BinaryXml_DTag_SignedInfo)))
     return error;
   
-  if ((error = ndn_decodeOptionalBinaryXmlPublisherPublicKeyDigest(&signedInfo->publisherPublicKeyDigest, decoder)))
+  if ((error = ndn_decodeOptionalBinaryXmlPublisherPublicKeyDigest(&metaInfo->publisherPublicKeyDigest, decoder)))
     return error;
   
   if (error= ndn_BinaryXmlDecoder_readOptionalTimeMillisecondsDTagElement
-      (decoder, ndn_BinaryXml_DTag_Timestamp, &signedInfo->timestampMilliseconds))
+      (decoder, ndn_BinaryXml_DTag_Timestamp, &metaInfo->timestampMilliseconds))
     return error;
   
   unsigned char *typeBytes;
@@ -133,21 +133,21 @@
     return error;
   if (typeBytesLength == 0)
     // The default Type is DATA.
-    signedInfo->type = ndn_ContentType_DATA;
+    metaInfo->type = ndn_ContentType_DATA;
   else if (typeBytesLength == 3) {
     // All the recognized content types are 3 bytes.
     if (ndn_memcmp(typeBytes, "\x0C\x04\xC0", typeBytesLength) == 0)
-      signedInfo->type = ndn_ContentType_DATA;
+      metaInfo->type = ndn_ContentType_DATA;
     else if (ndn_memcmp(typeBytes, "\x10\xD0\x91", typeBytesLength) == 0)
-      signedInfo->type = ndn_ContentType_ENCR;
+      metaInfo->type = ndn_ContentType_ENCR;
     else if (ndn_memcmp(typeBytes, "\x18\xE3\x44", typeBytesLength) == 0)
-      signedInfo->type = ndn_ContentType_GONE;
+      metaInfo->type = ndn_ContentType_GONE;
     else if (ndn_memcmp(typeBytes, "\x28\x46\x3F", typeBytesLength) == 0)
-      signedInfo->type = ndn_ContentType_KEY;
+      metaInfo->type = ndn_ContentType_KEY;
     else if (ndn_memcmp(typeBytes, "\x2C\x83\x4A", typeBytesLength) == 0)
-      signedInfo->type = ndn_ContentType_LINK;
+      metaInfo->type = ndn_ContentType_LINK;
     else if (ndn_memcmp(typeBytes, "\x34\x00\x8A", typeBytesLength) == 0)
-      signedInfo->type = ndn_ContentType_NACK;
+      metaInfo->type = ndn_ContentType_NACK;
     else
       return NDN_ERROR_unrecognized_ndn_ContentType;
   }
@@ -155,14 +155,14 @@
     return NDN_ERROR_unrecognized_ndn_ContentType;
  
   if ((error = ndn_BinaryXmlDecoder_readOptionalUnsignedIntegerDTagElement
-      (decoder, ndn_BinaryXml_DTag_FreshnessSeconds, &signedInfo->freshnessSeconds)))
+      (decoder, ndn_BinaryXml_DTag_FreshnessSeconds, &metaInfo->freshnessSeconds)))
     return error;
 
   if ((error = ndn_BinaryXmlDecoder_readOptionalBinaryDTagElement
-      (decoder, ndn_BinaryXml_DTag_FinalBlockID, 0, &signedInfo->finalBlockID, &signedInfo->finalBlockIDLength)))
+      (decoder, ndn_BinaryXml_DTag_FinalBlockID, 0, &metaInfo->finalBlockID, &metaInfo->finalBlockIDLength)))
     return error;
 
-  if ((error = ndn_decodeOptionalBinaryXmlKeyLocator(&signedInfo->keyLocator, decoder)))
+  if ((error = ndn_decodeOptionalBinaryXmlKeyLocator(&metaInfo->keyLocator, decoder)))
     return error;
   
   if ((error = ndn_BinaryXmlDecoder_readElementClose(decoder)))
@@ -186,7 +186,7 @@
   if ((error = ndn_encodeBinaryXmlName(&data->name, encoder)))
     return error;
   
-  if ((error = encodeSignedInfo(&data->signedInfo, encoder)))
+  if ((error = encodeSignedInfo(&data->metaInfo, encoder)))
     return error;
 
   if ((error = ndn_BinaryXmlEncoder_writeBlobDTagElement
@@ -226,11 +226,11 @@
   if ((error = ndn_BinaryXmlDecoder_peekDTag(decoder, ndn_BinaryXml_DTag_SignedInfo, &gotExpectedTag)))
     return error;
   if (gotExpectedTag) {
-    if ((error = decodeSignedInfo(&data->signedInfo, decoder)))
+    if ((error = decodeSignedInfo(&data->metaInfo, decoder)))
       return error;
   }
   else
-    ndn_SignedInfo_initialize(&data->signedInfo, data->signedInfo.keyLocator.keyName.components, data->signedInfo.keyLocator.keyName.maxComponents);
+    ndn_MetaInfo_initialize(&data->metaInfo, data->metaInfo.keyLocator.keyName.components, data->metaInfo.keyLocator.keyName.maxComponents);
 
   // Require a Content element, but set allowNull to allow a missing BLOB.
   if ((error = ndn_BinaryXmlDecoder_readBinaryDTagElement
