security: Add certfile cleanup to IdentityManagementFixture
Change-Id: I7e2c779e7ae6006e7df0d810d5bbf1cc11dede3f
Refs: #3855
diff --git a/tests/identity-management-fixture.hpp b/tests/identity-management-fixture.hpp
index 23eb91f..4df61bf 100644
--- a/tests/identity-management-fixture.hpp
+++ b/tests/identity-management-fixture.hpp
@@ -47,9 +47,22 @@
bool
addIdentity(const Name& identity, const KeyParams& params = KeyChain::DEFAULT_KEY_PARAMS);
+ /**
+ * @brief save identity certificate to a file
+ * @param identity identity name
+ * @param filename file name, should be writable
+ * @param wantAdd if true, add new identity when necessary
+ * @return whether successful
+ */
+ bool
+ saveIdentityCertificate(const Name& identity, const std::string& filename, bool wantAdd = false);
+
protected:
KeyChain m_keyChain;
+
+private:
std::vector<Name> m_identities;
+ std::vector<std::string> m_certFiles;
};
} // namespace tests