security: Removing unused SecPublicInfoMemory and SecTpmMemory

These two classes were meant for testing purpuses only, are no longer
used anywhere in ndn-cxx, and are not known to be used by any
applications.

Change-Id: I9b6c68bdf23419b7a274f63a64711fa843c2502c
diff --git a/src/security/sec-public-info-memory.cpp b/src/security/sec-public-info-memory.cpp
deleted file mode 100644
index 3b72c21..0000000
--- a/src/security/sec-public-info-memory.cpp
+++ /dev/null
@@ -1,207 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2014 Regents of the University of California.
- *
- * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
- *
- * ndn-cxx library is free software: you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later version.
- *
- * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- *
- * You should have received copies of the GNU General Public License and GNU Lesser
- * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
- *
- * @author Jeff Thompson <jefft0@remap.ucla.edu>
- */
-
-#include "common.hpp"
-
-#include "sec-public-info-memory.hpp"
-#include "identity-certificate.hpp"
-
-using namespace std;
-
-namespace ndn {
-
-SecPublicInfoMemory::~SecPublicInfoMemory()
-{
-}
-
-bool
-SecPublicInfoMemory::doesIdentityExist(const Name& identityName)
-{
-  string identityUri = identityName.toUri();
-  return find(m_identityStore.begin(), m_identityStore.end(), identityUri) != m_identityStore.end();
-}
-
-void
-SecPublicInfoMemory::addIdentity(const Name& identityName)
-{
-  string identityUri = identityName.toUri();
-  if (find(m_identityStore.begin(), m_identityStore.end(), identityUri) != m_identityStore.end())
-    return;
-
-  m_identityStore.push_back(identityUri);
-}
-
-bool
-SecPublicInfoMemory::revokeIdentity()
-{
-  throw Error("SecPublicInfoMemory::revokeIdentity not implemented");
-}
-
-bool
-SecPublicInfoMemory::doesPublicKeyExist(const Name& keyName)
-{
-  return m_keyStore.find(keyName.toUri()) != m_keyStore.end();
-}
-
-void
-SecPublicInfoMemory::addPublicKey(const Name& keyName, KeyType keyType, const PublicKey& publicKey)
-{
-  Name identityName = keyName.getPrefix(-1);
-
-  addIdentity(identityName);
-
-  m_keyStore[keyName.toUri()] = make_shared<KeyRecord>(keyType, publicKey);
-}
-
-shared_ptr<PublicKey>
-SecPublicInfoMemory::getPublicKey(const Name& keyName)
-{
-  KeyStore::iterator record = m_keyStore.find(keyName.toUri());
-  if (record == m_keyStore.end())
-    throw Error("SecPublicInfoMemory::getPublicKey  " + keyName.toUri());
-
-  return make_shared<PublicKey>(record->second->getKey());
-}
-
-bool
-SecPublicInfoMemory::doesCertificateExist(const Name& certificateName)
-{
-  return m_certificateStore.find(certificateName.toUri()) != m_certificateStore.end();
-}
-
-void
-SecPublicInfoMemory::addCertificate(const IdentityCertificate& certificate)
-{
-  const Name& certificateName = certificate.getName();
-  const Name& keyName = certificate.getPublicKeyName();
-  const Name& identity = keyName.getPrefix(-1);
-
-  addIdentity(identity);
-  addPublicKey(keyName, KEY_TYPE_RSA, certificate.getPublicKeyInfo());
-  m_certificateStore[certificateName.toUri()] = make_shared<IdentityCertificate>(certificate);
-}
-
-shared_ptr<IdentityCertificate>
-SecPublicInfoMemory::getCertificate(const Name& certificateName)
-{
-  CertificateStore::iterator record = m_certificateStore.find(certificateName.toUri());
-  if (record == m_certificateStore.end())
-    throw Error("SecPublicInfoMemory::getCertificate  " + certificateName.toUri());
-
-  return record->second;
-}
-
-Name
-SecPublicInfoMemory::getDefaultIdentity()
-{
-  return Name(m_defaultIdentity);
-}
-
-void
-SecPublicInfoMemory::setDefaultIdentityInternal(const Name& identityName)
-{
-  string identityUri = identityName.toUri();
-  if (find(m_identityStore.begin(), m_identityStore.end(), identityUri) != m_identityStore.end())
-    m_defaultIdentity = identityUri;
-  else
-    // The identity doesn't exist, so clear the default.
-    m_defaultIdentity.clear();
-}
-
-Name
-SecPublicInfoMemory::getDefaultKeyNameForIdentity(const Name& identityName)
-{
-  return m_defaultKeyName;
-}
-
-void
-SecPublicInfoMemory::setDefaultKeyNameForIdentityInternal(const Name& keyName)
-{
-  m_defaultKeyName = keyName;
-}
-
-Name
-SecPublicInfoMemory::getDefaultCertificateNameForKey(const Name& keyName)
-{
-  return m_defaultCert;
-}
-
-void
-SecPublicInfoMemory::setDefaultCertificateNameForKeyInternal(const Name& certificateName)
-{
-  m_defaultCert = certificateName;
-}
-
-void
-SecPublicInfoMemory::getAllIdentities(std::vector<Name>& nameList, bool isDefault)
-{
-  throw Error("SecPublicInfoMemory::getAllIdentities not implemented");
-}
-
-void
-SecPublicInfoMemory::getAllKeyNames(std::vector<Name>& nameList, bool isDefault)
-{
-  throw Error("SecPublicInfoMemory::getAllKeyNames not implemented");
-}
-
-void
-SecPublicInfoMemory::getAllKeyNamesOfIdentity(const Name& identity,
-                                              std::vector<Name>& nameList,
-                                              bool isDefault)
-{
-  throw Error("SecPublicInfoMemory::getAllKeyNamesOfIdentity not implemented");
-}
-
-void
-SecPublicInfoMemory::getAllCertificateNames(std::vector<Name>& nameList, bool isDefault)
-{
-  throw Error("SecPublicInfoMemory::getAllCertificateNames not implemented");
-}
-
-void
-SecPublicInfoMemory::getAllCertificateNamesOfKey(const Name& keyName,
-                                                 std::vector<Name>& nameList,
-                                                 bool isDefault)
-{
-  throw Error("SecPublicInfoMemory::getAllCertificateNamesOfKey not implemented");
-}
-
-void
-SecPublicInfoMemory::deleteCertificateInfo(const Name& certName)
-{
-  throw Error("SecPublicInfoMemory::deleteCertificateInfo not implemented");
-}
-
-void
-SecPublicInfoMemory::deletePublicKeyInfo(const Name& keyName)
-{
-  throw Error("SecPublicInfoMemory::deletePublicKeyInfo not implemented");
-}
-
-void
-SecPublicInfoMemory::deleteIdentityInfo(const Name& identityName)
-{
-  throw Error("SecPublicInfoMemory::deleteIdentityInfo not implemented");
-}
-
-} // namespace ndn
diff --git a/src/security/sec-public-info-memory.hpp b/src/security/sec-public-info-memory.hpp
deleted file mode 100644
index faf9c4c..0000000
--- a/src/security/sec-public-info-memory.hpp
+++ /dev/null
@@ -1,168 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2014 Regents of the University of California.
- *
- * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
- *
- * ndn-cxx library is free software: you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later version.
- *
- * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- *
- * You should have received copies of the GNU General Public License and GNU Lesser
- * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
- *
- * @author Jeff Thompson <jefft0@remap.ucla.edu>
- */
-
-#ifndef NDN_SECURITY_SEC_PUBLIC_INFO_MEMORY_HPP
-#define NDN_SECURITY_SEC_PUBLIC_INFO_MEMORY_HPP
-
-#include "../common.hpp"
-#include "sec-public-info.hpp"
-
-#include <map>
-
-namespace ndn {
-
-/**
- * @brief SecPublicInfoMemory extends SecPublicInfo and implements its methods to store identity,
- *        public key and certificate objects in memory.
- */
-class SecPublicInfoMemory : public SecPublicInfo
-{
-public:
-  class Error : public SecPublicInfo::Error
-  {
-  public:
-    explicit
-    Error(const std::string& what)
-      : SecPublicInfo::Error(what)
-    {
-    }
-  };
-
-  virtual
-  ~SecPublicInfoMemory();
-
-  virtual bool
-  doesIdentityExist(const Name& identityName);
-
-  virtual void
-  addIdentity(const Name& identityName);
-
-  virtual bool
-  revokeIdentity();
-
-  virtual bool
-  doesPublicKeyExist(const Name& keyName);
-
-  virtual void
-  addPublicKey(const Name& keyName, KeyType keyType, const PublicKey& publicKeyDer);
-
-  virtual shared_ptr<PublicKey>
-  getPublicKey(const Name& keyName);
-
-  virtual bool
-  doesCertificateExist(const Name& certificateName);
-
-  virtual void
-  addCertificate(const IdentityCertificate& certificate);
-
-  virtual shared_ptr<IdentityCertificate>
-  getCertificate(const Name& certificateName);
-
-  virtual Name
-  getDefaultIdentity();
-
-  virtual Name
-  getDefaultKeyNameForIdentity(const Name& identityName);
-
-  virtual Name
-  getDefaultCertificateNameForKey(const Name& keyName);
-
-  virtual void
-  getAllIdentities(std::vector<Name>& nameList, bool isDefault);
-
-  virtual void
-  getAllKeyNames(std::vector<Name>& nameList, bool isDefault);
-
-  virtual void
-  getAllKeyNamesOfIdentity(const Name& identity, std::vector<Name>& nameList, bool isDefault);
-
-  virtual void
-  getAllCertificateNames(std::vector<Name>& nameList, bool isDefault);
-
-  virtual void
-  getAllCertificateNamesOfKey(const Name& keyName, std::vector<Name>& nameList, bool isDefault);
-
-protected:
-  virtual void
-  setDefaultIdentityInternal(const Name& identityName);
-
-  virtual void
-  setDefaultKeyNameForIdentityInternal(const Name& keyName);
-
-  virtual void
-  setDefaultCertificateNameForKeyInternal(const Name& certificateName);
-
-  virtual void
-  deleteCertificateInfo(const Name& certificateName);
-
-  virtual void
-  deletePublicKeyInfo(const Name& keyName);
-
-  virtual void
-  deleteIdentityInfo(const Name& identity);
-
-
-private:
-  class KeyRecord
-  {
-  public:
-    KeyRecord(KeyType keyType, const PublicKey& key)
-    : m_keyType(keyType), m_key(key)
-    {
-    }
-
-    KeyType
-    getKeyType() const
-    {
-      return m_keyType;
-    }
-
-    const PublicKey&
-    getKey()
-    {
-      return m_key;
-    }
-
-  private:
-    KeyType   m_keyType;
-    PublicKey m_key;
-  };
-
-  std::vector<std::string> m_identityStore; // A list of name URI.
-  std::string m_defaultIdentity; // The default identity in m_identityStore, or "" if not defined.
-  Name m_defaultKeyName;
-  Name m_defaultCert;
-
-  // The map key is the keyName.toUri()
-  typedef std::map<std::string, shared_ptr<KeyRecord> > KeyStore;
-
-  // The map key is the certificateName.toUri()
-  typedef std::map<std::string, shared_ptr<IdentityCertificate> > CertificateStore;
-
-  KeyStore m_keyStore;
-  CertificateStore m_certificateStore;
-};
-
-} // namespace ndn
-
-#endif //NDN_SECURITY_SEC_PUBLIC_INFO_MEMORY_HPP
diff --git a/src/security/sec-tpm-memory.cpp b/src/security/sec-tpm-memory.cpp
deleted file mode 100644
index 5e26be2..0000000
--- a/src/security/sec-tpm-memory.cpp
+++ /dev/null
@@ -1,201 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2014 Regents of the University of California.
- *
- * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
- *
- * ndn-cxx library is free software: you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later version.
- *
- * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- *
- * You should have received copies of the GNU General Public License and GNU Lesser
- * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
- *
- * @author Jeff Thompson <jefft0@remap.ucla.edu>
- */
-
-#include "common.hpp"
-
-#include "sec-tpm-memory.hpp"
-#include "public-key.hpp"
-
-#include "openssl.hpp"
-#include "cryptopp.hpp"
-
-using namespace std;
-
-namespace ndn {
-
-/**
- * RsaPrivateKey is a simple class to hold an RSA private key.
- */
-class SecTpmMemory::RsaPrivateKey
-{
-public:
-  RsaPrivateKey(const uint8_t* keyDer, size_t keyDerLength)
-  {
-    // Use a temporary pointer since d2i updates it.
-    const uint8_t* derPointer = keyDer;
-    m_privateKey = d2i_RSAPrivateKey(NULL, &derPointer, keyDerLength);
-    if (!m_privateKey)
-      throw Error("RsaPrivateKey constructor: Error decoding private key DER");
-  }
-
-  ~RsaPrivateKey()
-  {
-    if (m_privateKey)
-      RSA_free(m_privateKey);
-  }
-
-  rsa_st*
-  getPrivateKey()
-  {
-    return m_privateKey;
-  }
-
-private:
-  rsa_st* m_privateKey;
-};
-
-SecTpmMemory::~SecTpmMemory()
-{
-}
-
-void
-SecTpmMemory::setKeyPairForKeyName(const Name& keyName,
-                                   const uint8_t* publicKeyDer, size_t publicKeyDerLength,
-                                   const uint8_t* privateKeyDer, size_t privateKeyDerLength)
-{
-  m_publicKeyStore[keyName.toUri()]  = make_shared<PublicKey>(publicKeyDer, publicKeyDerLength);
-  m_privateKeyStore[keyName.toUri()] = make_shared<RsaPrivateKey>(privateKeyDer,
-                                                                  privateKeyDerLength);
-}
-
-void
-SecTpmMemory::generateKeyPairInTpm(const Name& keyName, KeyType keyType, int keySize)
-{
-  throw Error("SecTpmMemory::generateKeyPair not implemented");
-}
-
-void
-SecTpmMemory::deleteKeyPairInTpm(const Name& keyName)
-{
-  throw Error("SecTpmMemory::deleteKeyPairInTpm not implemented");
-}
-
-ConstBufferPtr
-SecTpmMemory::exportPrivateKeyPkcs1FromTpm(const Name& keyName)
-{
-  return shared_ptr<Buffer>();
-}
-
-bool
-SecTpmMemory::importPrivateKeyPkcs1IntoTpm(const Name& keyName, const uint8_t* buf, size_t size)
-{
-  return false;
-}
-
-bool
-SecTpmMemory::importPublicKeyPkcs1IntoTpm(const Name& keyName, const uint8_t* buf, size_t size)
-{
-  return false;
-}
-
-shared_ptr<PublicKey>
-SecTpmMemory::getPublicKeyFromTpm(const Name& keyName)
-{
-  PublicKeyStore::iterator publicKey = m_publicKeyStore.find(keyName.toUri());
-  if (publicKey == m_publicKeyStore.end())
-    throw Error(string("MemoryPrivateKeyStorage: Cannot find public key ") + keyName.toUri());
-  return publicKey->second;
-}
-
-Block
-SecTpmMemory::signInTpm(const uint8_t* data, size_t dataLength,
-                        const Name& keyName,
-                        DigestAlgorithm digestAlgorithm)
-{
-  if (digestAlgorithm != DIGEST_ALGORITHM_SHA256)
-    throw Error("Unsupported digest algorithm.");
-
-  // Find the private key and sign.
-  PrivateKeyStore::iterator privateKey = m_privateKeyStore.find(keyName.toUri());
-  if (privateKey == m_privateKeyStore.end())
-    throw Error(string("MemoryPrivateKeyStorage: Cannot find private key ") + keyName.toUri());
-
-  uint8_t digest[SHA256_DIGEST_LENGTH];
-  SHA256_CTX sha256;
-  SHA256_Init(&sha256);
-  SHA256_Update(&sha256, data, dataLength);
-  SHA256_Final(digest,& sha256);
-
-  BufferPtr signatureBuffer = make_shared<Buffer>();
-  signatureBuffer->resize(RSA_size(privateKey->second->getPrivateKey()));
-
-  unsigned int signatureBitsLength;
-  if (!RSA_sign(NID_sha256, digest, sizeof(digest),
-                signatureBuffer->buf(),
-                &signatureBitsLength,
-                privateKey->second->getPrivateKey()))
-    {
-      throw Error("Error in RSA_sign");
-    }
-
-  return Block(Tlv::SignatureValue, signatureBuffer);
-}
-
-ConstBufferPtr
-SecTpmMemory::decryptInTpm(const uint8_t* data, size_t dataLength,
-                           const Name& keyName, bool isSymmetric)
-{
-  throw Error("MemoryPrivateKeyStorage::decrypt not implemented");
-}
-
-ConstBufferPtr
-SecTpmMemory::encryptInTpm(const uint8_t* data, size_t dataLength,
-                           const Name& keyName, bool isSymmetric)
-{
-  throw Error("MemoryPrivateKeyStorage::encrypt not implemented");
-}
-
-void
-SecTpmMemory::generateSymmetricKeyInTpm(const Name& keyName, KeyType keyType, int keySize)
-{
-  throw Error("MemoryPrivateKeyStorage::generateKey not implemented");
-}
-
-bool
-SecTpmMemory::doesKeyExistInTpm(const Name& keyName, KeyClass keyClass)
-{
-  if (keyClass == KEY_CLASS_PUBLIC)
-    return m_publicKeyStore.find(keyName.toUri()) != m_publicKeyStore.end();
-  else if (keyClass == KEY_CLASS_PRIVATE)
-    return m_privateKeyStore.find(keyName.toUri()) != m_privateKeyStore.end();
-  else
-    // KEY_CLASS_SYMMETRIC not implemented yet.
-    return false;
-}
-
-bool
-SecTpmMemory::generateRandomBlock(uint8_t* res, size_t size)
-{
-  try
-    {
-      CryptoPP::AutoSeededRandomPool rng;
-      rng.GenerateBlock(res, size);
-      return true;
-    }
-  catch (CryptoPP::Exception& e)
-    {
-      return false;
-    }
-}
-
-} // namespace ndn
diff --git a/src/security/sec-tpm-memory.hpp b/src/security/sec-tpm-memory.hpp
deleted file mode 100644
index 3ad2c13..0000000
--- a/src/security/sec-tpm-memory.hpp
+++ /dev/null
@@ -1,173 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2014 Regents of the University of California.
- *
- * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
- *
- * ndn-cxx library is free software: you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later version.
- *
- * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- *
- * You should have received copies of the GNU General Public License and GNU Lesser
- * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
- *
- * @author Jeff Thompson <jefft0@remap.ucla.edu>
- */
-
-#ifndef NDN_SECURITY_SEC_TPM_MEMORY_HPP
-#define NDN_SECURITY_SEC_TPM_MEMORY_HPP
-
-#include "../common.hpp"
-#include "sec-tpm.hpp"
-
-#include <map>
-
-struct rsa_st;
-
-namespace ndn {
-
-/**
- * @brief SecTpmMemory implements a simple in-memory TPM.
- *
- * You should initialize by calling setKeyPairForKeyName.
- */
-class SecTpmMemory : public SecTpm
-{
-public:
-  class Error : public SecTpm::Error
-  {
-  public:
-    explicit
-    Error(const std::string& what)
-      : SecTpm::Error(what)
-    {
-    }
-  };
-
-  virtual
-  ~SecTpmMemory();
-
-  /******************************
-   * From TrustedPlatformModule *
-   ******************************/
-
-  virtual void
-  setTpmPassword(const uint8_t* password, size_t passwordLength)
-  {
-  }
-
-  virtual void
-  resetTpmPassword()
-  {
-  }
-
-  virtual void
-  setInTerminal(bool inTerminal)
-  {
-    m_inTerminal = inTerminal;
-  }
-
-  virtual bool
-  getInTerminal() const
-  {
-    return m_inTerminal;
-  }
-
-  virtual bool
-  isLocked()
-  {
-    return false;
-  }
-
-  virtual bool
-  unlockTpm(const char* password, size_t passwordLength, bool usePassword)
-  {
-    return !isLocked();
-  }
-
-  virtual void
-  generateKeyPairInTpm(const Name& keyName, KeyType keyType, int keySize);
-
-  virtual shared_ptr<PublicKey>
-  getPublicKeyFromTpm(const Name& keyName);
-
-  virtual void
-  deleteKeyPairInTpm(const Name& keyName);
-
-  virtual Block
-  signInTpm(const uint8_t* data, size_t dataLength,
-            const Name& keyName, DigestAlgorithm digestAlgorithm);
-
-  virtual ConstBufferPtr
-  decryptInTpm(const uint8_t* data, size_t dataLength, const Name& keyName, bool isSymmetric);
-
-  virtual ConstBufferPtr
-  encryptInTpm(const uint8_t* data, size_t dataLength, const Name& keyName, bool isSymmetric);
-
-  virtual void
-  generateSymmetricKeyInTpm(const Name& keyName, KeyType keyType, int keySize);
-
-  virtual bool
-  doesKeyExistInTpm(const Name& keyName, KeyClass keyClass);
-
-  virtual bool
-  generateRandomBlock(uint8_t* res, size_t size);
-
-  virtual void
-  addAppToAcl(const Name& keyName, KeyClass keyClass, const std::string& appPath, AclType acl)
-  {
-  }
-
-  /******************************
-   *   SecTpmMemory specific    *
-   ******************************/
-
-  /**
-   * @brief Set the public and private key for the keyName.
-   *
-   * @param keyName The key name.
-   * @param publicKeyDer The public key DER byte array.
-   * @param publicKeyDerLength The length of publicKeyDer.
-   * @param privateKeyDer The private key DER byte array.
-   * @param privateKeyDerLength The length of privateKeyDer.
-   */
-  void setKeyPairForKeyName(const Name& keyName,
-                            const uint8_t* publicKeyDer, size_t publicKeyDerLength,
-                            const uint8_t* privateKeyDer, size_t privateKeyDerLength);
-
-protected:
-  /******************************
-   * From TrustedPlatformModule *
-   ******************************/
-  virtual ConstBufferPtr
-  exportPrivateKeyPkcs1FromTpm(const Name& keyName);
-
-  virtual bool
-  importPrivateKeyPkcs1IntoTpm(const Name& keyName, const uint8_t* buf, size_t size);
-
-  virtual bool
-  importPublicKeyPkcs1IntoTpm(const Name& keyName, const uint8_t* buf, size_t size);
-
-
-private:
-  class RsaPrivateKey;
-
-  typedef std::map<std::string, shared_ptr<PublicKey> >     PublicKeyStore;
-  typedef std::map<std::string, shared_ptr<RsaPrivateKey> > PrivateKeyStore;
-
-  PublicKeyStore  m_publicKeyStore;  /**< The map key is the keyName.toUri() */
-  PrivateKeyStore m_privateKeyStore; /**< The map key is the keyName.toUri() */
-
-  bool m_inTerminal;
-};
-
-} // namespace ndn
-
-#endif //NDN_SECURITY_SEC_TPM_MEMORY_HPP