diff --git a/src/security/tpm/tpm.cpp b/src/security/tpm/tpm.cpp
index 0ed1062..d72440b 100644
--- a/src/security/tpm/tpm.cpp
+++ b/src/security/tpm/tpm.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -138,36 +138,27 @@
   return m_backEnd->exportKey(keyName, pw, pwLen);
 }
 
-bool
+void
 Tpm::importPrivateKey(const Name& keyName, const uint8_t* pkcs8, size_t pkcs8Len,
                       const char* pw, size_t pwLen)
 {
-  try {
-    m_backEnd->importKey(keyName, pkcs8, pkcs8Len, pw, pwLen);
-  }
-  catch (const BackEnd::Error&) {
-    return false;
-  }
-  return true;
+  m_backEnd->importKey(keyName, pkcs8, pkcs8Len, pw, pwLen);
 }
 
 const KeyHandle*
 Tpm::findKey(const Name& keyName) const
 {
   auto it = m_keys.find(keyName);
-
   if (it != m_keys.end())
     return it->second.get();
 
-  unique_ptr<KeyHandle> handle = m_backEnd->getKeyHandle(keyName);
+  auto handle = m_backEnd->getKeyHandle(keyName);
+  if (handle == nullptr)
+    return nullptr;
 
-  if (handle != nullptr) {
-    KeyHandle* key = handle.get();
-    m_keys[keyName] = std::move(handle);
-    return key;
-  }
-
-  return nullptr;
+  const KeyHandle* key = handle.get();
+  m_keys[keyName] = std::move(handle);
+  return key;
 }
 
 } // namespace tpm
diff --git a/src/security/tpm/tpm.hpp b/src/security/tpm/tpm.hpp
index dde9d14..4ce57f2 100644
--- a/src/security/tpm/tpm.hpp
+++ b/src/security/tpm/tpm.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -22,10 +22,9 @@
 #ifndef NDN_SECURITY_TPM_TPM_HPP
 #define NDN_SECURITY_TPM_TPM_HPP
 
-#include "../security-common.hpp"
-#include "../../name.hpp"
-#include "../key-params.hpp"
 #include "key-handle.hpp"
+#include "../key-params.hpp"
+#include "../../name.hpp"
 
 #include <unordered_map>
 
@@ -180,7 +179,7 @@
    * @param pw The password to encrypt the private key
    * @param pwLen The length of the password
    * @return The encoded private key wrapper.
-   * @throw BackEnd::Error the key does not exist or it cannot be exported.
+   * @throw BackEnd::Error The key does not exist or it could not be exported.
    */
   ConstBufferPtr
   exportPrivateKey(const Name& keyName, const char* pw, size_t pwLen) const;
@@ -193,16 +192,16 @@
    * @param pkcs8Len The length of the private key wrapper
    * @param pw The password to encrypt the private key
    * @param pwLen The length of the password
-   * @return true if the operation is successful, false otherwise.
+   * @throw BackEnd::Error The key could not be imported.
    */
-  bool
+  void
   importPrivateKey(const Name& keyName, const uint8_t* pkcs8, size_t pkcs8Len,
                    const char* pw, size_t pwLen);
 
   /**
    * @brief Clear the key cache.
    *
-   * An empty cache can force Tpm to do key lookup in back-end.
+   * An empty cache can force Tpm to do key lookup in the back-end.
    */
   void
   clearKeyCache()
