In ndn_decodeBinaryXmlData, added signedFieldsBeginOffset and signedFieldsEndOffset.
diff --git a/ndn-cpp/c/encoding/binary-xml-data.c b/ndn-cpp/c/encoding/binary-xml-data.c
index b2d391a..564e6f4 100644
--- a/ndn-cpp/c/encoding/binary-xml-data.c
+++ b/ndn-cpp/c/encoding/binary-xml-data.c
@@ -159,7 +159,8 @@
return NDN_ERROR_success;
}
-ndn_Error ndn_decodeBinaryXmlData(struct ndn_Data *data, struct ndn_BinaryXmlDecoder *decoder)
+ndn_Error ndn_decodeBinaryXmlData
+ (struct ndn_Data *data, unsigned int *signedFieldsBeginOffset, unsigned int *signedFieldsEndOffset, struct ndn_BinaryXmlDecoder *decoder)
{
ndn_Error error;
if ((error = ndn_BinaryXmlDecoder_readElementStartDTag(decoder, ndn_BinaryXml_DTag_ContentObject)))
@@ -175,6 +176,8 @@
else
ndn_Signature_init(&data->signature);
+ *signedFieldsBeginOffset = decoder->offset;
+
if ((error = ndn_decodeBinaryXmlName(&data->name, decoder)))
return error;
@@ -192,6 +195,8 @@
(decoder, ndn_BinaryXml_DTag_Content, 1, &data->content, &data->contentLength)))
return error;
+ *signedFieldsEndOffset = decoder->offset;
+
if ((error = ndn_BinaryXmlDecoder_readElementClose(decoder)))
return error;