security: stop installing headers of concrete PIB, TPM, and KeyHandle implementations

Refs: #4782
Change-Id: I23bb75c485034140f29b10bd3a103f4aa480be4b
diff --git a/tests/unit/security/pib/certificate-container.t.cpp b/tests/unit/security/pib/certificate-container.t.cpp
index f34c0fe..b6e9f12 100644
--- a/tests/unit/security/pib/certificate-container.t.cpp
+++ b/tests/unit/security/pib/certificate-container.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2019 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -20,8 +20,8 @@
  */
 
 #include "ndn-cxx/security/pib/certificate-container.hpp"
+#include "ndn-cxx/security/pib/impl/pib-memory.hpp"
 #include "ndn-cxx/security/pib/pib.hpp"
-#include "ndn-cxx/security/pib/pib-memory.hpp"
 
 #include "tests/boost-test.hpp"
 #include "tests/unit/security/pib/pib-data-fixture.hpp"
diff --git a/tests/unit/security/pib/identity-container.t.cpp b/tests/unit/security/pib/identity-container.t.cpp
index fbce528..fb5e9cc 100644
--- a/tests/unit/security/pib/identity-container.t.cpp
+++ b/tests/unit/security/pib/identity-container.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2019 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -20,8 +20,8 @@
  */
 
 #include "ndn-cxx/security/pib/identity-container.hpp"
+#include "ndn-cxx/security/pib/impl/pib-memory.hpp"
 #include "ndn-cxx/security/pib/pib.hpp"
-#include "ndn-cxx/security/pib/pib-memory.hpp"
 
 #include "tests/boost-test.hpp"
 #include "tests/unit/security/pib/pib-data-fixture.hpp"
diff --git a/tests/unit/security/pib/identity.t.cpp b/tests/unit/security/pib/identity.t.cpp
index 5769fde..4d79bbc 100644
--- a/tests/unit/security/pib/identity.t.cpp
+++ b/tests/unit/security/pib/identity.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2019 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -20,9 +20,9 @@
  */
 
 #include "ndn-cxx/security/pib/identity.hpp"
-#include "ndn-cxx/security/pib/pib.hpp"
-#include "ndn-cxx/security/pib/pib-memory.hpp"
 #include "ndn-cxx/security/pib/impl/identity-impl.hpp"
+#include "ndn-cxx/security/pib/impl/pib-memory.hpp"
+#include "ndn-cxx/security/pib/pib.hpp"
 
 #include "tests/boost-test.hpp"
 #include "tests/unit/security/pib/pib-data-fixture.hpp"
@@ -38,44 +38,24 @@
 BOOST_AUTO_TEST_SUITE(Pib)
 BOOST_FIXTURE_TEST_SUITE(TestIdentity, PibDataFixture)
 
-using pib::Pib;
-
 BOOST_AUTO_TEST_CASE(ValidityChecking)
 {
-  using security::pib::detail::IdentityImpl;
-
   Identity id;
-
+  BOOST_CHECK(!id);
   BOOST_CHECK_EQUAL(static_cast<bool>(id), false);
-  BOOST_CHECK_EQUAL(!id, true);
 
-  if (id)
-    BOOST_CHECK(false);
-  else
-    BOOST_CHECK(true);
-
-  auto identityImpl = make_shared<IdentityImpl>(id1, make_shared<PibMemory>(), true);
+  auto identityImpl = make_shared<detail::IdentityImpl>(id1, make_shared<PibMemory>(), true);
   id = Identity(identityImpl);
-
-  BOOST_CHECK_EQUAL(static_cast<bool>(id), true);
+  BOOST_CHECK(id);
   BOOST_CHECK_EQUAL(!id, false);
-
-  if (id)
-    BOOST_CHECK(true);
-  else
-    BOOST_CHECK(false);
 }
 
-/**
- * pib::Identity is a wrapper of pib::detail::IdentityImpl.  Since the functionalities of
- * IdentityImpl have already been tested in detail/identity-impl.t.cpp, we only test the shared
- * property of pib::Identity in this test case.
- */
-BOOST_AUTO_TEST_CASE(Share)
+// pib::Identity is a wrapper of pib::detail::IdentityImpl.  Since the functionalities of
+// IdentityImpl have already been tested in detail/identity-impl.t.cpp, we only test the shared
+// property of pib::Identity in this test case.
+BOOST_AUTO_TEST_CASE(SharedImpl)
 {
-  using security::pib::detail::IdentityImpl;
-
-  auto identityImpl = make_shared<IdentityImpl>(id1, make_shared<pib::PibMemory>(), true);
+  auto identityImpl = make_shared<detail::IdentityImpl>(id1, make_shared<pib::PibMemory>(), true);
   Identity identity1(identityImpl);
   Identity identity2(identityImpl);
   BOOST_CHECK_EQUAL(identity1, identity2);
@@ -85,7 +65,7 @@
   identity1.addKey(id1Key1.data(), id1Key1.size(), id1Key1Name);
   BOOST_CHECK_NO_THROW(identity2.getKey(id1Key1Name));
   identity2.removeKey(id1Key1Name);
-  BOOST_CHECK_THROW(identity1.getKey(id1Key1Name), Pib::Error);
+  BOOST_CHECK_THROW(identity1.getKey(id1Key1Name), pib::Pib::Error);
 
   identity1.setDefaultKey(id1Key1.data(), id1Key1.size(), id1Key1Name);
   BOOST_CHECK_NO_THROW(identity2.getDefaultKey());
diff --git a/tests/unit/security/pib/impl/identity-impl.t.cpp b/tests/unit/security/pib/impl/identity-impl.t.cpp
index 40bf424..bb523f4 100644
--- a/tests/unit/security/pib/impl/identity-impl.t.cpp
+++ b/tests/unit/security/pib/impl/identity-impl.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2019 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -20,8 +20,8 @@
  */
 
 #include "ndn-cxx/security/pib/impl/identity-impl.hpp"
+#include "ndn-cxx/security/pib/impl/pib-memory.hpp"
 #include "ndn-cxx/security/pib/pib.hpp"
-#include "ndn-cxx/security/pib/pib-memory.hpp"
 
 #include "tests/boost-test.hpp"
 #include "tests/unit/security/pib/pib-data-fixture.hpp"
diff --git a/tests/unit/security/pib/impl/key-impl.t.cpp b/tests/unit/security/pib/impl/key-impl.t.cpp
index e6860be..2a6c641 100644
--- a/tests/unit/security/pib/impl/key-impl.t.cpp
+++ b/tests/unit/security/pib/impl/key-impl.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2019 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -20,8 +20,8 @@
  */
 
 #include "ndn-cxx/security/pib/impl/key-impl.hpp"
+#include "ndn-cxx/security/pib/impl/pib-memory.hpp"
 #include "ndn-cxx/security/pib/pib.hpp"
-#include "ndn-cxx/security/pib/pib-memory.hpp"
 
 #include "tests/boost-test.hpp"
 #include "tests/identity-management-fixture.hpp"
diff --git a/tests/unit/security/pib/key-container.t.cpp b/tests/unit/security/pib/key-container.t.cpp
index ce5b6ab..aab7b1c 100644
--- a/tests/unit/security/pib/key-container.t.cpp
+++ b/tests/unit/security/pib/key-container.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2019 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -20,8 +20,8 @@
  */
 
 #include "ndn-cxx/security/pib/key-container.hpp"
+#include "ndn-cxx/security/pib/impl/pib-memory.hpp"
 #include "ndn-cxx/security/pib/pib.hpp"
-#include "ndn-cxx/security/pib/pib-memory.hpp"
 
 #include "tests/boost-test.hpp"
 #include "tests/unit/security/pib/pib-data-fixture.hpp"
diff --git a/tests/unit/security/pib/key.t.cpp b/tests/unit/security/pib/key.t.cpp
index 8dfe9c8..f5c62fa 100644
--- a/tests/unit/security/pib/key.t.cpp
+++ b/tests/unit/security/pib/key.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2019 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -20,9 +20,9 @@
  */
 
 #include "ndn-cxx/security/pib/key.hpp"
-#include "ndn-cxx/security/pib/pib.hpp"
-#include "ndn-cxx/security/pib/pib-memory.hpp"
 #include "ndn-cxx/security/pib/impl/key-impl.hpp"
+#include "ndn-cxx/security/pib/impl/pib-memory.hpp"
+#include "ndn-cxx/security/pib/pib.hpp"
 
 #include "tests/boost-test.hpp"
 #include "tests/unit/security/pib/pib-data-fixture.hpp"
@@ -38,47 +38,26 @@
 BOOST_AUTO_TEST_SUITE(Pib)
 BOOST_FIXTURE_TEST_SUITE(TestKey, PibDataFixture)
 
-using pib::Pib;
-
 BOOST_AUTO_TEST_CASE(ValidityChecking)
 {
-  using security::pib::detail::KeyImpl;
-
   Key key;
-
+  BOOST_CHECK(!key);
   BOOST_CHECK_EQUAL(static_cast<bool>(key), false);
-  BOOST_CHECK_EQUAL(!key, true);
 
-  if (key)
-    BOOST_CHECK(false);
-  else
-    BOOST_CHECK(true);
-
-  auto keyImpl = make_shared<KeyImpl>(id1Key1Name, id1Key1.data(), id1Key1.size(),
-                                      make_shared<pib::PibMemory>());
+  auto keyImpl = make_shared<detail::KeyImpl>(id1Key1Name, id1Key1.data(), id1Key1.size(),
+                                              make_shared<pib::PibMemory>());
   key = Key(keyImpl);
-
-  BOOST_CHECK_EQUAL(static_cast<bool>(key), true);
+  BOOST_CHECK(key);
   BOOST_CHECK_EQUAL(!key, false);
-
-  if (key)
-    BOOST_CHECK(true);
-  else
-    BOOST_CHECK(false);
 }
 
-/**
- * pib::Key is a wrapper of pib::detail::KeyImpl.  Since the functionalities of KeyImpl
- * have already been tested in detail/key-impl.t.cpp, we only test the shared property
- * of pib::Key in this test case.
- */
-
-BOOST_AUTO_TEST_CASE(Share)
+// pib::Key is a wrapper of pib::detail::KeyImpl.  Since the functionalities of KeyImpl
+// have already been tested in detail/key-impl.t.cpp, we only test the shared property
+// of pib::Key in this test case.
+BOOST_AUTO_TEST_CASE(SharedImpl)
 {
-  using security::pib::detail::KeyImpl;
-
-  auto keyImpl = make_shared<KeyImpl>(id1Key1Name, id1Key1.data(), id1Key1.size(),
-                                      make_shared<pib::PibMemory>());
+  auto keyImpl = make_shared<detail::KeyImpl>(id1Key1Name, id1Key1.data(), id1Key1.size(),
+                                              make_shared<pib::PibMemory>());
   Key key1(keyImpl);
   Key key2(keyImpl);
   BOOST_CHECK_EQUAL(key1, key2);
@@ -88,7 +67,7 @@
   key1.addCertificate(id1Key1Cert1);
   BOOST_CHECK_NO_THROW(key2.getCertificate(id1Key1Cert1.getName()));
   key2.removeCertificate(id1Key1Cert1.getName());
-  BOOST_CHECK_THROW(key1.getCertificate(id1Key1Cert1.getName()), Pib::Error);
+  BOOST_CHECK_THROW(key1.getCertificate(id1Key1Cert1.getName()), pib::Pib::Error);
 
   key1.setDefaultCertificate(id1Key1Cert1);
   BOOST_CHECK_NO_THROW(key2.getDefaultCertificate());
diff --git a/tests/unit/security/pib/pib-impl.t.cpp b/tests/unit/security/pib/pib-impl.t.cpp
index 2cbdc2f..500e5fd 100644
--- a/tests/unit/security/pib/pib-impl.t.cpp
+++ b/tests/unit/security/pib/pib-impl.t.cpp
@@ -19,8 +19,8 @@
  * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
  */
 
-#include "ndn-cxx/security/pib/pib-memory.hpp"
-#include "ndn-cxx/security/pib/pib-sqlite3.hpp"
+#include "ndn-cxx/security/pib/impl/pib-memory.hpp"
+#include "ndn-cxx/security/pib/impl/pib-sqlite3.hpp"
 #include "ndn-cxx/security/pib/pib.hpp"
 #include "ndn-cxx/security/security-common.hpp"
 
diff --git a/tests/unit/security/pib/pib-memory.t.cpp b/tests/unit/security/pib/pib-memory.t.cpp
deleted file mode 100644
index 0f8caef..0000000
--- a/tests/unit/security/pib/pib-memory.t.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2013-2018 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.
- */
-
-#include "ndn-cxx/security/pib/pib-memory.hpp"
-
-#include "tests/boost-test.hpp"
-
-namespace ndn {
-namespace security {
-namespace pib {
-namespace tests {
-
-BOOST_AUTO_TEST_SUITE(Security)
-BOOST_AUTO_TEST_SUITE(Pib)
-BOOST_AUTO_TEST_SUITE(TestPibMemory)
-
-// Functionality is tested as part of pib-impl.t.cpp
-
-BOOST_AUTO_TEST_SUITE_END() // TestPibMemory
-BOOST_AUTO_TEST_SUITE_END() // Pib
-BOOST_AUTO_TEST_SUITE_END() // Security
-
-} // namespace tests
-} // namespace pib
-} // namespace security
-} // namespace ndn
diff --git a/tests/unit/security/pib/pib-sqlite3.t.cpp b/tests/unit/security/pib/pib-sqlite3.t.cpp
deleted file mode 100644
index 5b27d29..0000000
--- a/tests/unit/security/pib/pib-sqlite3.t.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2013-2018 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.
- */
-
-#include "ndn-cxx/security/pib/pib-sqlite3.hpp"
-
-#include "tests/boost-test.hpp"
-
-namespace ndn {
-namespace security {
-namespace pib {
-namespace tests {
-
-BOOST_AUTO_TEST_SUITE(Security)
-BOOST_AUTO_TEST_SUITE(Pib)
-BOOST_AUTO_TEST_SUITE(TestPibSqlite3)
-
-// Functionality is tested as part of pib-impl.t.cpp
-
-BOOST_AUTO_TEST_SUITE_END() // TestPibSqlite3
-BOOST_AUTO_TEST_SUITE_END() // Pib
-BOOST_AUTO_TEST_SUITE_END() // Security
-
-} // namespace tests
-} // namespace pib
-} // namespace security
-} // namespace ndn
diff --git a/tests/unit/security/pib/pib.t.cpp b/tests/unit/security/pib/pib.t.cpp
index 29787e2..c40cddc 100644
--- a/tests/unit/security/pib/pib.t.cpp
+++ b/tests/unit/security/pib/pib.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2019 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -20,7 +20,7 @@
  */
 
 #include "ndn-cxx/security/pib/pib.hpp"
-#include "ndn-cxx/security/pib/pib-memory.hpp"
+#include "ndn-cxx/security/pib/impl/pib-memory.hpp"
 
 #include "tests/boost-test.hpp"
 #include "tests/unit/security/pib/pib-data-fixture.hpp"
@@ -43,25 +43,12 @@
   Pib pib("pib-memory", "", make_shared<PibMemory>());
 
   Identity id = pib.addIdentity(id1);
-
-  BOOST_CHECK_EQUAL(static_cast<bool>(id), true);
+  BOOST_CHECK(id);
   BOOST_CHECK_EQUAL(!id, false);
 
-  if (id)
-    BOOST_CHECK(true);
-  else
-    BOOST_CHECK(false);
-
-  // key
   Key key = id.addKey(id1Key1.data(), id1Key1.size(), id1Key1Name);
-
-  BOOST_CHECK_EQUAL(static_cast<bool>(key), true);
+  BOOST_CHECK(key);
   BOOST_CHECK_EQUAL(!key, false);
-
-  if (key)
-    BOOST_CHECK(true);
-  else
-    BOOST_CHECK(false);
 }
 
 BOOST_AUTO_TEST_CASE(TpmLocator)