security: Reorganizing source code to prepare for support of two version of NDN certificates
This commit also removes unused ndn_digestSha256 function and deprecates
crypto::sha256 in favor of crypto::computeSha256Digest in util/crypto.hpp.
Change-Id: I24ee50ff073a96b868633bdf2cfade412d3605f3
Refs: #3098
diff --git a/tests/unit-tests/security/sec-tpm-osx.t.cpp b/tests/unit-tests/security/sec-tpm-osx.t.cpp
index ee9f96b..6bb283a 100644
--- a/tests/unit-tests/security/sec-tpm-osx.t.cpp
+++ b/tests/unit-tests/security/sec-tpm-osx.t.cpp
@@ -20,7 +20,7 @@
*/
#include "security/sec-tpm-osx.hpp"
-#include "security/cryptopp.hpp"
+#include "security/v1/cryptopp.hpp"
#include "util/time.hpp"
@@ -30,6 +30,7 @@
#include "boost-test.hpp"
namespace ndn {
+namespace security {
namespace tests {
class OsxKeyChainTestFixture
@@ -100,7 +101,7 @@
BOOST_CHECK_NO_THROW(sigBlock = tpm.signInTpm(content, sizeof(content),
keyName, DigestAlgorithm::SHA256));
- shared_ptr<PublicKey> publicKey;
+ shared_ptr<v1::PublicKey> publicKey;
BOOST_CHECK_NO_THROW(publicKey = tpm.getPublicKeyFromTpm(keyName));
try
{
@@ -168,7 +169,7 @@
ConstBufferPtr exported;
BOOST_CHECK_NO_THROW(exported = tpm.exportPrivateKeyPkcs5FromTpm(keyName, "1234"));
- shared_ptr<PublicKey> publicKey;
+ shared_ptr<v1::PublicKey> publicKey;
BOOST_REQUIRE_NO_THROW(publicKey = tpm.getPublicKeyFromTpm(keyName));
tpm.deleteKeyPairInTpm(keyName);
@@ -253,7 +254,7 @@
BOOST_CHECK_NO_THROW(sigBlock = tpm.signInTpm(content, sizeof(content),
keyName, DigestAlgorithm::SHA256));
- shared_ptr<PublicKey> pubkeyPtr;
+ shared_ptr<v1::PublicKey> pubkeyPtr;
BOOST_CHECK_NO_THROW(pubkeyPtr = tpm.getPublicKeyFromTpm(keyName));
try
@@ -303,7 +304,7 @@
ConstBufferPtr exported;
BOOST_CHECK_NO_THROW(exported = tpm.exportPrivateKeyPkcs5FromTpm(keyName, "1234"));
- shared_ptr<PublicKey> publicKey;
+ shared_ptr<v1::PublicKey> publicKey;
BOOST_REQUIRE_NO_THROW(publicKey = tpm.getPublicKeyFromTpm(keyName));
tpm.deleteKeyPairInTpm(keyName);
@@ -362,4 +363,5 @@
BOOST_AUTO_TEST_SUITE_END()
} // namespace tests
+} // namespace security
} // namespace ndn