Add certificate field to client config and use bool for probe field in ca config

Change-Id: Ib1dcaf07cdb214ea777a26adaed12e488663b3b3
diff --git a/tests/unit-tests/ca-config.t.cpp b/tests/unit-tests/ca-config.t.cpp
index e803254..532aeeb 100644
--- a/tests/unit-tests/ca-config.t.cpp
+++ b/tests/unit-tests/ca-config.t.cpp
@@ -36,7 +36,7 @@
   config.load("tests/unit-tests/ca.conf.test");
   auto itemA = config.m_caItems.front();
   BOOST_CHECK_EQUAL(itemA.m_caName.toUri(), "/ndn/edu/ucla/cs/zhiyi");
-  BOOST_CHECK_EQUAL(itemA.m_probe, "true");
+  BOOST_CHECK(!itemA.m_probe);
   BOOST_CHECK_EQUAL(itemA.m_freshnessPeriod, time::seconds(720));
   BOOST_CHECK_EQUAL(itemA.m_validityPeriod, time::days(360));
   BOOST_CHECK_EQUAL(itemA.m_anchor.toUri(),
@@ -45,7 +45,7 @@
 
   auto itemB = config.m_caItems.back();
   BOOST_CHECK_EQUAL(itemB.m_caName.toUri(), "/ndn/site1");
-  BOOST_CHECK_EQUAL(itemB.m_probe, "true");
+  BOOST_CHECK(itemB.m_probe);
   BOOST_CHECK_EQUAL(itemB.m_freshnessPeriod, time::seconds(720));
   BOOST_CHECK_EQUAL(itemB.m_validityPeriod, time::days(360));
   BOOST_CHECK_EQUAL(itemB.m_anchor.toUri(),
diff --git a/tests/unit-tests/ca.conf.test b/tests/unit-tests/ca.conf.test
index 838d9c4..87db072 100644
--- a/tests/unit-tests/ca.conf.test
+++ b/tests/unit-tests/ca.conf.test
@@ -3,8 +3,6 @@
   [
     {
         "ca-prefix": "/ndn/edu/ucla/cs/zhiyi",
-        "ca-info": "UCLA's ceritificate authority, located in BH4805.",
-        "probe": "true",
         "issuing-freshness": "720",
         "validity-period": "360",
         "ca-anchor": "/ndn/edu/ucla/cs/zhiyi/KEY/%9A%E0%C6%C6%09%7C%92i/self/%FD%00%00%01Z%B0%2AJ%B4",
@@ -15,7 +13,6 @@
     },
     {
         "ca-prefix": "/ndn/site1",
-        "ca-info": "UCLA's ceritificate authority, located in BH4805.",
         "probe": "true",
         "issuing-freshness": "720",
         "validity-period": "360",
diff --git a/tests/unit-tests/client-config.t.cpp b/tests/unit-tests/client-config.t.cpp
index f9c7530..e1ad082 100644
--- a/tests/unit-tests/client-config.t.cpp
+++ b/tests/unit-tests/client-config.t.cpp
@@ -39,6 +39,8 @@
   BOOST_CHECK_EQUAL(item.m_probe, "Please use your email address to apply a namespace first. UCLA email is preferred.");
   BOOST_CHECK_EQUAL(item.m_supportedChallenges.size(), 2);
   BOOST_CHECK_EQUAL(item.m_supportedChallenges.front(), "PIN");
+  BOOST_CHECK_EQUAL(item.m_anchor.getName().toUri(),
+                    "/ndn/site1/KEY/%11%BC%22%F4c%15%FF%17/self/%FD%00%00%01Y%C8%14%D9%A5");
 }
 
 BOOST_AUTO_TEST_CASE(AddAndRemoveCaItem)
@@ -46,7 +48,7 @@
   ClientConfig config;
   config.load("tests/unit-tests/client.conf.test");
 
-  CaItem item;
+  ClientCaItem item;
   item.m_caName = Name("/test");
   item.m_caInfo = "test";
   item.m_probe = "test";
diff --git a/tests/unit-tests/client.conf.test b/tests/unit-tests/client.conf.test
index 745a43b..7c2dbf1 100644
--- a/tests/unit-tests/client.conf.test
+++ b/tests/unit-tests/client.conf.test
@@ -5,6 +5,7 @@
         "ca-prefix": "/ndn/edu/ucla/CA",
         "ca-info": "UCLA's ceritificate authority, located in BH4805.",
         "probe": "Please use your email address to apply a namespace first. UCLA email is preferred.",
+        "certificate": "Bv0CJAcsCANuZG4IBXNpdGUxCANLRVkICBG8IvRjFf8XCARzZWxmCAn9AAABWcgU2aUUCRgBAhkEADbugBX9AU8wggFLMIIBAwYHKoZIzj0CATCB9wIBATAsBgcqhkjOPQEBAiEA/////wAAAAEAAAAAAAAAAAAAAAD///////////////8wWwQg/////wAAAAEAAAAAAAAAAAAAAAD///////////////wEIFrGNdiqOpPns+u9VXaYhrxlHQawzFOw9jvOPD4n0mBLAxUAxJ02CIbnBJNqZnjhE50mt4GffpAEQQRrF9Hy4SxCR/i85uVjpEDydwN9gS3rM6D0oTlF2JjClk/jQuL+Gn+bjufrSnwPnhYrzjNXazFezsu2QGg3v1H1AiEA/////wAAAAD//////////7zm+q2nF56E87nKwvxjJVECAQEDQgAES9Cb9iANUNYmwt5bjwNW1mZgjzIkDJb6FTCdiYWnkMMIVxh2YDllphoWDEAPS6kqJczzCuhnGYpZCp9tTaYKGxZMGwEDHB0HGwgDbmRuCAVzaXRlMQgDS0VZCAgRvCL0YxX/F/0A/Sb9AP4PMTk3MDAxMDFUMDAwMDAw/QD/DzIwMzcwMTE3VDIxMjg0NhdIMEYCIQDXkR1hF3GiP7yLXq+0JBJfi9QC+hhAu/1Bykx+MWz6RAIhANwelBTxxZr2C5bD15mjfhWudK4I1tOb4b/9xWCHyM7F",
         "supported-challenges":
         [
             { "type": "PIN" },
@@ -14,6 +15,7 @@
     {
         "ca-prefix": "/ndn/edu/ucla/zhiyi/CA",
         "ca-info": "Zhiyi's own ceritificate authority",
+        "certificate": "Bv0CJAcsCANuZG4IBXNpdGUxCANLRVkICBG8IvRjFf8XCARzZWxmCAn9AAABWcgU2aUUCRgBAhkEADbugBX9AU8wggFLMIIBAwYHKoZIzj0CATCB9wIBATAsBgcqhkjOPQEBAiEA/////wAAAAEAAAAAAAAAAAAAAAD///////////////8wWwQg/////wAAAAEAAAAAAAAAAAAAAAD///////////////wEIFrGNdiqOpPns+u9VXaYhrxlHQawzFOw9jvOPD4n0mBLAxUAxJ02CIbnBJNqZnjhE50mt4GffpAEQQRrF9Hy4SxCR/i85uVjpEDydwN9gS3rM6D0oTlF2JjClk/jQuL+Gn+bjufrSnwPnhYrzjNXazFezsu2QGg3v1H1AiEA/////wAAAAD//////////7zm+q2nF56E87nKwvxjJVECAQEDQgAES9Cb9iANUNYmwt5bjwNW1mZgjzIkDJb6FTCdiYWnkMMIVxh2YDllphoWDEAPS6kqJczzCuhnGYpZCp9tTaYKGxZMGwEDHB0HGwgDbmRuCAVzaXRlMQgDS0VZCAgRvCL0YxX/F/0A/Sb9AP4PMTk3MDAxMDFUMDAwMDAw/QD/DzIwMzcwMTE3VDIxMjg0NhdIMEYCIQDXkR1hF3GiP7yLXq+0JBJfi9QC+hhAu/1Bykx+MWz6RAIhANwelBTxxZr2C5bD15mjfhWudK4I1tOb4b/9xWCHyM7F",
         "supported-challenges":
         [
             { "type": "PIN" }