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-tpm-osx.cpp b/tests/test-sec-tpm-osx.cpp
index 9e0f29f..5bd0467 100644
--- a/tests/test-sec-tpm-osx.cpp
+++ b/tests/test-sec-tpm-osx.cpp
@@ -23,7 +23,7 @@
   SecTpmOsx tpm;
   
   Name keyName("/tmp/ksk-123456");
-  tpm.generateKeyPairInTpm(keyName, KEY_TYPE_RSA, 2048);
+  BOOST_CHECK_NO_THROW(tpm.generateKeyPairInTpm(keyName, KEY_TYPE_RSA, 2048));
   
   BOOST_REQUIRE_EQUAL(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PUBLIC), true);
   BOOST_REQUIRE_EQUAL(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PRIVATE), true);
@@ -39,7 +39,7 @@
   SecTpmOsx tpm;
 
   Name keyName("/tmp/ksk-123456");
-  tpm.generateKeyPairInTpm(keyName, KEY_TYPE_RSA, 2048);
+  BOOST_CHECK_NO_THROW(tpm.generateKeyPairInTpm(keyName, KEY_TYPE_RSA, 2048));
   
   Data data("/tmp/test/1");
   const uint8_t content[] = {0x01, 0x02, 0x03, 0x04};