security: Move KeyChain to security::v1 namespace and deprecated it
Change-Id: Ic4b6915ca15998a83b410f3f8fac027f797ee7ca
Refs: #3098
diff --git a/tests/identity-management-fixture.cpp b/tests/identity-management-fixture.cpp
index 0b296f7..6767d62 100644
--- a/tests/identity-management-fixture.cpp
+++ b/tests/identity-management-fixture.cpp
@@ -60,11 +60,11 @@
IdentityManagementFixture::saveIdentityCertificate(const Name& identity,
const std::string& filename, bool wantAdd)
{
- shared_ptr<ndn::IdentityCertificate> cert;
+ shared_ptr<security::v1::IdentityCertificate> cert;
try {
cert = m_keyChain.getCertificate(m_keyChain.getDefaultCertificateNameForIdentity(identity));
}
- catch (const ndn::SecPublicInfo::Error&) {
+ catch (const security::v1::SecPublicInfo::Error&) {
if (wantAdd && this->addIdentity(identity)) {
return this->saveIdentityCertificate(identity, filename, false);
}
@@ -73,10 +73,10 @@
m_certFiles.push_back(filename);
try {
- ndn::io::save(*cert, filename);
+ io::save(*cert, filename);
return true;
}
- catch (const ndn::io::Error&) {
+ catch (const io::Error&) {
return false;
}
}
@@ -94,11 +94,11 @@
try {
identityKeyName = m_keyChain.getDefaultKeyNameForIdentity(identity);
}
- catch (const ndn::SecPublicInfo::Error&) {
+ catch (const security::v1::SecPublicInfo::Error&) {
identityKeyName = m_keyChain.generateRsaKeyPairAsDefault(identity, true);
}
- std::vector<ndn::CertificateSubjectDescription> subjectDescription;
- shared_ptr<ndn::IdentityCertificate> identityCert =
+ std::vector<security::v1::CertificateSubjectDescription> subjectDescription;
+ shared_ptr<security::v1::IdentityCertificate> identityCert =
m_keyChain.prepareUnsignedIdentityCertificate(identityKeyName,
issuer,
time::system_clock::now(),