security+util: mark all pimpl unique_ptrs const
Change-Id: I3966c4988dceb49c204e23967ba90729877bddf1
diff --git a/src/security/tpm/tpm.hpp b/src/security/tpm/tpm.hpp
index 82ea656..dde9d14 100644
--- a/src/security/tpm/tpm.hpp
+++ b/src/security/tpm/tpm.hpp
@@ -22,11 +22,11 @@
#ifndef NDN_SECURITY_TPM_TPM_HPP
#define NDN_SECURITY_TPM_TPM_HPP
-#include "../../common.hpp"
#include "../security-common.hpp"
#include "../../name.hpp"
#include "../key-params.hpp"
#include "key-handle.hpp"
+
#include <unordered_map>
namespace ndn {
@@ -154,12 +154,6 @@
*/
Tpm(const std::string& scheme, const std::string& location, unique_ptr<BackEnd> impl);
- BackEnd*
- getBackEnd()
- {
- return m_backEnd.get();
- }
-
/**
* @brief Create key for @p identityName according to @p params.
*
@@ -189,7 +183,7 @@
* @throw BackEnd::Error the key does not exist or it cannot be exported.
*/
ConstBufferPtr
- exportPrivateKey(const Name& keyName, const char* pw, size_t pwLen);
+ exportPrivateKey(const Name& keyName, const char* pw, size_t pwLen) const;
/**
* @brief Import a private key.
@@ -231,7 +225,7 @@
mutable std::unordered_map<Name, unique_ptr<KeyHandle>> m_keys;
- unique_ptr<BackEnd> m_backEnd;
+ const unique_ptr<BackEnd> m_backEnd;
friend class v2::KeyChain;
};