security: Identity/Key comparison operators
This commit adds ==, !=, and stream insertion operators to
Identity and Key types, so that `ndnsec list` can display
default identity and key properly.
Also, a missing assignment is added to `ndnsec list` routine.
refs #4085
Change-Id: I025af1d6281acb9e9261461520bbd74af53b811e
diff --git a/tests/unit-tests/security/pib/key.t.cpp b/tests/unit-tests/security/pib/key.t.cpp
index 2275c2e..a3543a3 100644
--- a/tests/unit-tests/security/pib/key.t.cpp
+++ b/tests/unit-tests/security/pib/key.t.cpp
@@ -79,6 +79,9 @@
auto keyImpl = make_shared<KeyImpl>(id1Key1Name, id1Key1.buf(), id1Key1.size(), make_shared<pib::PibMemory>());
Key key1(keyImpl);
Key key2(keyImpl);
+ BOOST_CHECK_EQUAL(key1, key2);
+ BOOST_CHECK_NE(key1, Key());
+ BOOST_CHECK_EQUAL(Key(), Key());
key1.addCertificate(id1Key1Cert1);
BOOST_CHECK_NO_THROW(key2.getCertificate(id1Key1Cert1.getName()));