management: nfd::ForwarderStatus
nfd::Status is renamed to ForwarderStatus.
Fields are swapped according to new Management protocol.
ForwarderStatus::wireEncode uses Content as outermost element.
refs #1422
Change-Id: I388d5eb56eed2a9958a27e51e010c696e9608ca9
diff --git a/tests/security/identity-fixture.cpp b/tests/security/identity-fixture.cpp
index 2cc7e4f..1c286e2 100644
--- a/tests/security/identity-fixture.cpp
+++ b/tests/security/identity-fixture.cpp
@@ -19,7 +19,13 @@
IdentityFixture()
{
// save the old default identity
- m_oldDefaultIdentity = m_keyChain.getDefaultIdentity();
+ try {
+ m_oldDefaultIdentity = m_keyChain.getDefaultIdentity();
+ m_hasOldDefaultIdentity = true;
+ }
+ catch (SecPublicInfo::Error& e) {
+ m_hasOldDefaultIdentity = false;
+ }
m_newIdentity.set("/ndn-cpp-dev-test-identity");
m_newIdentity.appendVersion();
@@ -35,14 +41,19 @@
~IdentityFixture()
{
// recover the old default setting
- m_keyChain.setDefaultIdentity(m_oldDefaultIdentity);
+ if (m_hasOldDefaultIdentity) {
+ m_keyChain.setDefaultIdentity(m_oldDefaultIdentity);
+ }
// remove the temporarily created identity and certificates
+ // XXX This has no effect if oldDefaultIdentity doesn't exist.
+ // newIdentity would be kept as default.
m_keyChain.deleteIdentity(m_newIdentity);
}
private:
KeyChain m_keyChain;
+ bool m_hasOldDefaultIdentity;
Name m_oldDefaultIdentity;
Name m_newIdentity;
};