Upgrade to NFD 22.02 and ndn-cxx 0.8.0 and fixes for NS-3.35
Change-Id: Ia26204f1ecddc93729e5565d5dbbb2a3d1d9637e
diff --git a/apps/ndn-producer.cpp b/apps/ndn-producer.cpp
index 87e7a94..73f5e72 100644
--- a/apps/ndn-producer.cpp
+++ b/apps/ndn-producer.cpp
@@ -110,17 +110,18 @@
data->setContent(make_shared< ::ndn::Buffer>(m_virtualPayloadSize));
- Signature signature;
SignatureInfo signatureInfo(static_cast< ::ndn::tlv::SignatureTypeValue>(255));
if (m_keyLocator.size() > 0) {
signatureInfo.setKeyLocator(m_keyLocator);
}
- signature.setInfo(signatureInfo);
- signature.setValue(::ndn::makeNonNegativeIntegerBlock(::ndn::tlv::SignatureValue, m_signature));
+ data->setSignatureInfo(signatureInfo);
- data->setSignature(signature);
+ ::ndn::EncodingEstimator estimator;
+ ::ndn::EncodingBuffer encoder(estimator.appendVarNumber(m_signature), 0);
+ encoder.appendVarNumber(m_signature);
+ data->setSignatureValue(encoder.getBuffer());
NS_LOG_INFO("node(" << GetNode()->GetId() << ") responding with Data: " << data->getName());