fix some errors in the previous refactor

Change-Id: I6fced76ee754d93aa571313b81f3704dd50f1f35
diff --git a/src/protocol-detail/info.cpp b/src/protocol-detail/info.cpp
index 306d060..da8b969 100644
--- a/src/protocol-detail/info.cpp
+++ b/src/protocol-detail/info.cpp
@@ -36,7 +36,6 @@
     caInfo = caConfig.m_caInfo;
   }
   content.push_back(makeStringBlock(tlv_ca_info, caInfo));
-
   for (const auto& key : caConfig.m_probeParameterKeys) {
     content.push_back(makeStringBlock(tlv_parameter_key, key));
   }
@@ -55,9 +54,9 @@
   CaConfigItem result;
   block.parse();
   for (auto const& item : block.elements()) {
-    item.parse();
     switch (item.type()) {
     case tlv_ca_prefix:
+      item.parse();
       result.m_caPrefix.wireDecode(item.get(tlv::Name));
       break;
     case tlv_ca_info:
@@ -73,7 +72,8 @@
       result.m_maxSuffixLength = readNonNegativeInteger(item);
       break;
     case tlv_ca_certificate:
-      result.m_cert->wireDecode(item.get(tlv::Data));
+      item.parse();
+      result.m_cert = std::make_shared<security::v2::Certificate>(item.get(tlv::Data));
       break;
     default:
       continue;