security: Separate TPM locator modification and database resetting in PIB
Change-Id: I80c2805b6e1204b95d59a090a6a04e1ee62fb6e5
Refs: #3203
diff --git a/src/security/pib/pib-impl.hpp b/src/security/pib/pib-impl.hpp
index 6f233f1..9b343f5 100644
--- a/src/security/pib/pib-impl.hpp
+++ b/src/security/pib/pib-impl.hpp
@@ -60,12 +60,9 @@
public: // TpmLocator management
/**
- * @brief Set the corresponding TPM information to @p tpmLocator.
+ * @brief Set the corresponding TPM information to @p tpmLocator
*
- * If the provided @p tpmLocator is different from the existing one, the
- * content in PIB will be cleaned up, otherwise nothing will be changed.
- *
- * @param tpmLocator The name for the new TPM locator
+ * This method does not reset contents of the PIB
*/
virtual void
setTpmLocator(const std::string& tpmLocator) = 0;
@@ -108,7 +105,15 @@
virtual void
removeIdentity(const Name& identity) = 0;
- /// @brief Get the name of all the identities
+ /**
+ * @brief Erasing all certificates, keys, and identities
+ */
+ virtual void
+ clearIdentities() = 0;
+
+ /**
+ * @brief Get the name of all the identities
+ */
virtual std::set<Name>
getIdentities() const = 0;