security: Add failureInfo in ValidationFailed callback

Change-Id: I98e49fc88665ad7b7c268bd6a8fdddf6b7071021
diff --git a/tests/security/test-signed-interest.cpp b/tests/security/test-signed-interest.cpp
index 3adb0a4..4be5d9f 100644
--- a/tests/security/test-signed-interest.cpp
+++ b/tests/security/test-signed-interest.cpp
@@ -54,8 +54,10 @@
   { m_validity = true; }
 
   void
-  validationFailed(const shared_ptr<const Interest>& interest)
-  { m_validity = false; }
+  validationFailed(const shared_ptr<const Interest>& interest, const string& failureInfo)
+  {
+    m_validity = false; 
+  }
 
   void
   reset()
@@ -67,7 +69,7 @@
 BOOST_FIXTURE_TEST_CASE (CommandInterest, CommandInterestFixture)
 {
   KeyChain keyChain;
-  Name identity("/TestCommandInterest/Validation");
+  Name identity("/TestCommandInterest/Validation/" + boost::lexical_cast<string>(time::now()));
   Name certName;
   BOOST_REQUIRE_NO_THROW(certName = keyChain.createIdentity(identity));
 
@@ -81,7 +83,7 @@
   generator.generateWithIdentity(*commandInterest1, identity);
   validator.validate(*commandInterest1,
   		     bind(&CommandInterestFixture::validated, this, _1),
-  		     bind(&CommandInterestFixture::validationFailed, this, _1));
+  		     bind(&CommandInterestFixture::validationFailed, this, _1, _2));
   
   BOOST_CHECK_EQUAL(m_validity, true);
   
@@ -99,7 +101,7 @@
   keyChain.signByIdentity(*commandInterest2, identity);
   validator.validate(*commandInterest2,
   		     bind(&CommandInterestFixture::validated, this, _1),
-  		     bind(&CommandInterestFixture::validationFailed, this, _1));
+  		     bind(&CommandInterestFixture::validationFailed, this, _1, _2));
   
   BOOST_CHECK_EQUAL(m_validity, false);
   
@@ -112,7 +114,7 @@
   generator.generateWithIdentity(*commandInterest3, identity2);
   validator.validate(*commandInterest3,
   		     bind(&CommandInterestFixture::validated, this, _1),
-  		     bind(&CommandInterestFixture::validationFailed, this, _1));
+  		     bind(&CommandInterestFixture::validationFailed, this, _1, _2));
   
   BOOST_CHECK_EQUAL(m_validity, false);
 
@@ -121,7 +123,7 @@
   generator.generateWithIdentity(*commandInterest4, identity);
   validator.validate(*commandInterest4,
   		     bind(&CommandInterestFixture::validated, this, _1),
-  		     bind(&CommandInterestFixture::validationFailed, this, _1));
+  		     bind(&CommandInterestFixture::validationFailed, this, _1, _2));
   
   BOOST_CHECK_EQUAL(m_validity, false);
 
diff --git a/tests/security/test-validator.cpp b/tests/security/test-validator.cpp
index 5c4fba0..bf55bda 100644
--- a/tests/security/test-validator.cpp
+++ b/tests/security/test-validator.cpp
@@ -22,8 +22,10 @@
 { BOOST_CHECK(true); }
 
 void
-onValidationFailed(const shared_ptr<const Data>& data)
-{ BOOST_CHECK(false); }
+onValidationFailed(const shared_ptr<const Data>& data, const string& failureInfo)
+{ 
+  BOOST_CHECK(false); 
+}
 
 BOOST_AUTO_TEST_CASE (Null)
 {
@@ -43,7 +45,7 @@
   // data must be a shared pointer
   validator.validate(*data,
 		     bind(&onValidated, _1),
-		     bind(&onValidationFailed, _1));
+		     bind(&onValidationFailed, _1, _2));
 
   keyChain.deleteIdentity(identity);
 }