security: tolerate invalid or unsupported public keys in PIB
Change-Id: I3c1dd9d3fe81d0895e2d1706f0b29a8e61940beb
diff --git a/tests/unit/security/pib/identity.t.cpp b/tests/unit/security/pib/identity.t.cpp
index 5a1816e..be2d03b 100644
--- a/tests/unit/security/pib/identity.t.cpp
+++ b/tests/unit/security/pib/identity.t.cpp
@@ -39,14 +39,17 @@
Identity id;
BOOST_TEST(!id);
BOOST_TEST(id == Identity());
+ BOOST_CHECK_THROW(id.getName(), std::domain_error);
auto impl = std::make_shared<detail::IdentityImpl>(id1, makePibWithIdentity(id1));
id = Identity(impl);
BOOST_TEST(id);
BOOST_TEST(id != Identity());
+ BOOST_TEST(id.getName() == id1);
impl.reset();
BOOST_TEST(!id);
+ BOOST_CHECK_THROW(id.getName(), std::domain_error);
}
// pib::Identity is a wrapper of pib::detail::IdentityImpl. Since the functionality