security: Consistent exception handling.

Change-Id: Ia29963e96028e591e9c4fc4a68a472f794b17e52
diff --git a/tests/security/test-validator.cpp b/tests/security/test-validator.cpp
index 48e1eec..5c4fba0 100644
--- a/tests/security/test-validator.cpp
+++ b/tests/security/test-validator.cpp
@@ -29,14 +29,14 @@
 {
   KeyChainImpl<SecPublicInfoSqlite3, SecTpmFile> keyChain;
 
-  Name identity(string("/TestValidator/Null/") + boost::lexical_cast<std::string>(time::now()));
-  keyChain.createIdentity(identity);
+  Name identity("/TestValidator/Null/" + boost::lexical_cast<std::string>(time::now()));
+  BOOST_REQUIRE_NO_THROW(keyChain.createIdentity(identity));
 
   Name dataName = identity;
   dataName.append("1");
   shared_ptr<Data> data = make_shared<Data>(dataName);
 
-  keyChain.signByIdentity(*data, identity);
+  BOOST_CHECK_NO_THROW(keyChain.signByIdentity(*data, identity));
   
   ValidatorNull validator;