security: Changing security storage location. Adding test case
1. The default location of publilc info storage of SecPublicInfoSqlite3 is changed to ~/.ndnx/ndnsec-public-info.db
2. The default location of key directory of SecTpmFile is changed to ~/.ndnx/ndnsec-tpm-file/
3. Add a test case for SecTpmFile.
Change-Id: I2e314072ff05e3b8da308b577bc85d417ff22476
diff --git a/src/security/sec-public-info-sqlite3.cpp b/src/security/sec-public-info-sqlite3.cpp
index 80f7b78..6c1ea7b 100644
--- a/src/security/sec-public-info-sqlite3.cpp
+++ b/src/security/sec-public-info-sqlite3.cpp
@@ -102,7 +102,7 @@
// TODO: Handle non-unix file systems which don't have "mkdir -p".
::system(("mkdir -p " + identityDir).c_str());
- int res = sqlite3_open((identityDir + '/' + "ndnsec-identity.db").c_str(), &database_);
+ int res = sqlite3_open((identityDir + '/' + "ndnsec-public-info.db").c_str(), &database_);
if (res != SQLITE_OK)
throw Error("identity DB cannot be opened/created");
diff --git a/src/security/sec-tpm-file.cpp b/src/security/sec-tpm-file.cpp
index c711089..3981ec4 100644
--- a/src/security/sec-tpm-file.cpp
+++ b/src/security/sec-tpm-file.cpp
@@ -7,6 +7,10 @@
* See COPYING for copyright and distribution information.
*/
+#if __clang__
+#pragma clang diagnostic ignored "-Wtautological-compare"
+#endif
+
#include <ndn-cpp-dev/security/sec-tpm-file.hpp>
#include <string>
@@ -38,7 +42,7 @@
Impl(const string &dir)
{
if(dir.empty())
- m_keystorePath = boost::filesystem::path(getenv("HOME")) / ".ndnx" / "ndnsec-keys";
+ m_keystorePath = boost::filesystem::path(getenv("HOME")) / ".ndnx" / "ndnsec-tpm-file";
else
m_keystorePath = dir;