Avoid deprecated ndn-cxx functions
Change-Id: Idcef8a642affb276581397e869d19534ec776240
diff --git a/src/detail/request-encoder.cpp b/src/detail/request-encoder.cpp
index fde2d86..1187243 100644
--- a/src/detail/request-encoder.cpp
+++ b/src/detail/request-encoder.cpp
@@ -31,9 +31,8 @@
const std::vector<uint8_t>& ecdhPub,
const Certificate& certRequest)
{
- Block
- request(ndn::tlv::ApplicationParameters);
- request.push_back(ndn::makeBinaryBlock(tlv::EcdhPub, ecdhPub.data(), ecdhPub.size()));
+ Block request(ndn::tlv::ApplicationParameters);
+ request.push_back(ndn::makeBinaryBlock(tlv::EcdhPub, ecdhPub));
if (requestType == RequestType::NEW || requestType == RequestType::RENEW) {
request.push_back(makeNestedBlock(tlv::CertRequest, certRequest));
}
@@ -83,14 +82,15 @@
}
Block
-requesttlv::encodeDataContent(const std::vector <uint8_t>& ecdhKey, const std::array<uint8_t, 32>& salt,
+requesttlv::encodeDataContent(const std::vector<uint8_t>& ecdhKey,
+ const std::array<uint8_t, 32>& salt,
const RequestId& requestId,
- const std::vector <std::string>& challenges)
+ const std::vector<std::string>& challenges)
{
Block response(ndn::tlv::Content);
- response.push_back(ndn::makeBinaryBlock(tlv::EcdhPub, ecdhKey.data(), ecdhKey.size()));
- response.push_back(ndn::makeBinaryBlock(tlv::Salt, salt.data(), salt.size()));
- response.push_back(ndn::makeBinaryBlock(tlv::RequestId, requestId.data(), requestId.size()));
+ response.push_back(ndn::makeBinaryBlock(tlv::EcdhPub, ecdhKey));
+ response.push_back(ndn::makeBinaryBlock(tlv::Salt, salt));
+ response.push_back(ndn::makeBinaryBlock(tlv::RequestId, requestId));
for (const auto& entry: challenges) {
response.push_back(ndn::makeStringBlock(tlv::Challenge, entry));
}