Migrate to ndn-cxx 0.7.1: Part 1
Change-Id: I621a6230272cfde5d84aa5ca9abdf40a91337491
diff --git a/src/identity-challenge/challenge-credential.cpp b/src/identity-challenge/challenge-credential.cpp
index f6e26c2..0d171e4 100644
--- a/src/identity-challenge/challenge-credential.cpp
+++ b/src/identity-challenge/challenge-credential.cpp
@@ -65,7 +65,7 @@
auto it = anchorList.begin();
for (; it != anchorList.end(); it++) {
std::istringstream ss(it->second.get("certificate", ""));
- auto cert = io::load<security::v2::Certificate>(ss);
+ auto cert = io::load<security::Certificate>(ss);
if (cert == nullptr) {
_LOG_ERROR("Cannot load the certificate from config file");
continue;
@@ -82,7 +82,7 @@
if (m_trustAnchors.empty()) {
parseConfigFile();
}
- security::v2::Certificate credential;
+ security::Certificate credential;
const uint8_t* signature;
size_t signatureLen;
const auto& elements = params.elements();
@@ -105,7 +105,7 @@
}
// verify the credential and the self-signed cert
- Name signingKeyName = credential.getSignature().getKeyLocator().getName();
+ Name signingKeyName = credential.getSignatureInfo().getKeyLocator().getName();
security::transform::PublicKey key;
const auto& pubKeyBuffer = credential.getPublicKey();
key.loadPkcs8(pubKeyBuffer.data(), pubKeyBuffer.size());
@@ -176,8 +176,8 @@
KeyChain& keyChain, const Name& issuedCertName, const std::string& requestId)
{
auto& pib = keyChain.getPib();
- auto id = pib.getIdentity(security::v2::extractIdentityFromCertName(issuedCertName));
- auto issuedCert = id.getKey(security::v2::extractKeyNameFromCertName(issuedCertName)).getCertificate(issuedCertName);
+ auto id = pib.getIdentity(security::extractIdentityFromCertName(issuedCertName));
+ auto issuedCert = id.getKey(security::extractKeyNameFromCertName(issuedCertName)).getCertificate(issuedCertName);
auto issuedCertTlv = issuedCert.wireEncode();
auto signatureTlv = keyChain.sign((uint8_t*)requestId.c_str(), requestId.length(), security::signingByCertificate(issuedCertName));
for (auto& item : params) {
diff --git a/src/identity-challenge/challenge-credential.hpp b/src/identity-challenge/challenge-credential.hpp
index 2c0229b..49670f6 100644
--- a/src/identity-challenge/challenge-credential.hpp
+++ b/src/identity-challenge/challenge-credential.hpp
@@ -76,7 +76,7 @@
parseConfigFile();
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
- std::list<security::v2::Certificate> m_trustAnchors;
+ std::list<security::Certificate> m_trustAnchors;
std::string m_configFile;
};