security: Fix a bug of Validator, making checkPolicy methods pure abstract

This commit also includes fixes to unit tests.

Change-Id: If92569fc9dabaa08714d458e5195b6a83acb8701
diff --git a/tests/test-sec-public-info-sqlite3.cpp b/tests/test-sec-public-info-sqlite3.cpp
index 6e684e9..c1c5d57 100644
--- a/tests/test-sec-public-info-sqlite3.cpp
+++ b/tests/test-sec-public-info-sqlite3.cpp
@@ -11,6 +11,7 @@
 #include <boost/test/unit_test.hpp>
 
 #include "security/key-chain.hpp"
+#include "util/time.hpp"
 
 using namespace std;
 namespace ndn {
@@ -21,14 +22,19 @@
 {
   KeyChainImpl<SecPublicInfoSqlite3, SecTpmFile> keyChain;
 
-  Name identity("/tmp");
+  Name identity(string("/TestSecPublicInfoSqlite3/Delete/") + boost::lexical_cast<string>(time::now()));
   Name certName1 = keyChain.createIdentity(identity);
   Name keyName1 = IdentityCertificate::certificateNameToPublicKeyName(certName1);  
-  Name keyName2 = keyChain.generateRSAKeyPairAsDefault(identity);
+  Name keyName2;
+  BOOST_CHECK_NO_THROW(keyName2 = keyChain.generateRSAKeyPairAsDefault(identity));
+  
   ptr_lib::shared_ptr<IdentityCertificate> cert2 = keyChain.selfSign(keyName2);
   Name certName2 = cert2->getName();
   keyChain.addCertificateAsKeyDefault(*cert2);
-  Name keyName3 = keyChain.generateRSAKeyPairAsDefault(identity);
+  
+  Name keyName3;
+  BOOST_CHECK_NO_THROW(keyName3 = keyChain.generateRSAKeyPairAsDefault(identity));
+  
   ptr_lib::shared_ptr<IdentityCertificate> cert3 = keyChain.selfSign(keyName3);
   Name certName3 = cert3->getName();
   keyChain.addCertificateAsKeyDefault(*cert3);