working on TLV encoding
diff --git a/src/client-module.cpp b/src/client-module.cpp
index bf0ce20..1789632 100644
--- a/src/client-module.cpp
+++ b/src/client-module.cpp
@@ -59,11 +59,10 @@
}
bool
-ClientModule::verifyProbeInfoResponse(const Data& reply)
+ClientModule::verifyProbeInfoResponse(const Block& contentBlock)
{
// parse the ca item
- auto contentJson = getJsonFromData(reply);
- auto caItem = ClientConfig::extractCaItem(contentJson);
+ auto caItem = ClientConfig::extractCaItem(contentBlock);
// verify the probe Data's sig
if (!security::verifySignature(reply, caItem.m_anchor)) {
@@ -76,9 +75,10 @@
void
ClientModule::addCaFromProbeInfoResponse(const Data& reply)
{
+ const Block& contentBlock = reply.getContent();
+
// parse the ca item
- auto contentJson = getJsonFromData(reply);
- auto caItem = ClientConfig::extractCaItem(contentJson);
+ auto caItem = ClientConfig::extractCaItem(contentBlock);
// update the local config
bool findItem = false;