In all .cpp files, remove using namespace ndn::ptr_lib and explicitly use ptr_lib::shared_ptr and make_shared.
diff --git a/src/security/certificate/certificate-extension.cpp b/src/security/certificate/certificate-extension.cpp
index b2c1bad..f081f2a 100644
--- a/src/security/certificate/certificate-extension.cpp
+++ b/src/security/certificate/certificate-extension.cpp
@@ -11,18 +11,17 @@
#include <ndn-cpp/security/certificate/certificate-extension.hpp>
using namespace std;
-using namespace ndn::ptr_lib;
namespace ndn {
-shared_ptr<der::DerNode>
+ptr_lib::shared_ptr<der::DerNode>
CertificateExtension::toDer()
{
- shared_ptr<der::DerSequence> root(new der::DerSequence);
+ ptr_lib::shared_ptr<der::DerSequence> root(new der::DerSequence);
- shared_ptr<der::DerOid> extensionId(new der::DerOid(extensionId_));
- shared_ptr<der::DerBool> isCritical(new der::DerBool(isCritical_));
- shared_ptr<der::DerOctetString> extensionValue(new der::DerOctetString(*extensionValue_));
+ ptr_lib::shared_ptr<der::DerOid> extensionId(new der::DerOid(extensionId_));
+ ptr_lib::shared_ptr<der::DerBool> isCritical(new der::DerBool(isCritical_));
+ ptr_lib::shared_ptr<der::DerOctetString> extensionValue(new der::DerOctetString(*extensionValue_));
root->addChild(extensionId);
root->addChild(isCritical);
diff --git a/src/security/certificate/certificate-subject-description.cpp b/src/security/certificate/certificate-subject-description.cpp
index ee2310c..9aa511f 100644
--- a/src/security/certificate/certificate-subject-description.cpp
+++ b/src/security/certificate/certificate-subject-description.cpp
@@ -10,17 +10,16 @@
#include <ndn-cpp/security/certificate/certificate-subject-description.hpp>
using namespace std;
-using namespace ndn::ptr_lib;
namespace ndn {
-shared_ptr<der::DerNode>
+ptr_lib::shared_ptr<der::DerNode>
CertificateSubjectDescription::toDer()
{
- shared_ptr<der::DerSequence> root(new der::DerSequence());
+ ptr_lib::shared_ptr<der::DerSequence> root(new der::DerSequence());
- shared_ptr<der::DerOid> oid(new der::DerOid(oid_));
- shared_ptr<der::DerPrintableString> value(new der::DerPrintableString(value_));
+ ptr_lib::shared_ptr<der::DerOid> oid(new der::DerOid(oid_));
+ ptr_lib::shared_ptr<der::DerPrintableString> value(new der::DerPrintableString(value_));
root->addChild(oid);
root->addChild(value);
diff --git a/src/security/certificate/certificate.cpp b/src/security/certificate/certificate.cpp
index 6856a2a..82b6364 100644
--- a/src/security/certificate/certificate.cpp
+++ b/src/security/certificate/certificate.cpp
@@ -22,7 +22,6 @@
INIT_LOGGER("ndn.security.Certificate");
using namespace std;
-using namespace ndn::ptr_lib;
namespace ndn {
@@ -68,20 +67,20 @@
void
Certificate::encode()
{
- shared_ptr<der::DerSequence> root(new der::DerSequence());
+ ptr_lib::shared_ptr<der::DerSequence> root(new der::DerSequence());
- shared_ptr<der::DerSequence> validity(new der::DerSequence());
- shared_ptr<der::DerGtime> notBefore(new der::DerGtime(notBefore_));
- shared_ptr<der::DerGtime> notAfter(new der::DerGtime(notAfter_));
+ ptr_lib::shared_ptr<der::DerSequence> validity(new der::DerSequence());
+ ptr_lib::shared_ptr<der::DerGtime> notBefore(new der::DerGtime(notBefore_));
+ ptr_lib::shared_ptr<der::DerGtime> notAfter(new der::DerGtime(notAfter_));
validity->addChild(notBefore);
validity->addChild(notAfter);
root->addChild(validity);
- shared_ptr<der::DerSequence> subjectList(new der::DerSequence());
+ ptr_lib::shared_ptr<der::DerSequence> subjectList(new der::DerSequence());
SubjectDescriptionList::iterator it = subjectDescriptionList_.begin();
for(; it != subjectDescriptionList_.end(); it++)
{
- shared_ptr<der::DerNode> child = it->toDer();
+ ptr_lib::shared_ptr<der::DerNode> child = it->toDer();
subjectList->addChild(child);
}
root->addChild(subjectList);
@@ -90,7 +89,7 @@
if(!extensionList_.empty())
{
- shared_ptr<der::DerSequence> extnList(new der::DerSequence());
+ ptr_lib::shared_ptr<der::DerSequence> extnList(new der::DerSequence());
ExtensionList::iterator it = extensionList_.begin();
for(; it != extensionList_.end(); it++)
extnList->addChild(it->toDer());
@@ -102,7 +101,7 @@
root->encode(start);
- shared_ptr<vector<uint8_t> > blob = blobStream.buf();
+ ptr_lib::shared_ptr<vector<uint8_t> > blob = blobStream.buf();
setContent(blob);
getMetaInfo().setType(ndn_ContentType_KEY);
}
@@ -114,7 +113,7 @@
ndnboost::iostreams::stream<ndnboost::iostreams::array_source> is((const char*)blob.buf(), blob.size());
- shared_ptr<der::DerNode> node = der::DerNode::parse(reinterpret_cast<der::InputIterator&>(is));
+ ptr_lib::shared_ptr<der::DerNode> node = der::DerNode::parse(reinterpret_cast<der::InputIterator&>(is));
// der::PrintVisitor printVisitor;
// node->accept(printVisitor, string(""));
@@ -138,7 +137,7 @@
ndnboost::iostreams::stream<ndnboost::iostreams::array_source> is((const char*)key_.getKeyDer().buf(), key_.getKeyDer().size());
- shared_ptr<der::DerNode> keyRoot = der::DerNode::parse(reinterpret_cast<der::InputIterator&> (is));
+ ptr_lib::shared_ptr<der::DerNode> keyRoot = der::DerNode::parse(reinterpret_cast<der::InputIterator&> (is));
der::PrintVisitor printVisitor;
keyRoot->accept(printVisitor, string(""));
diff --git a/src/security/certificate/public-key.cpp b/src/security/certificate/public-key.cpp
index 1d5deb8..f57f5a6 100644
--- a/src/security/certificate/public-key.cpp
+++ b/src/security/certificate/public-key.cpp
@@ -15,11 +15,10 @@
#include <ndn-cpp/security/certificate/public-key.hpp>
using namespace std;
-using namespace ndn::ptr_lib;
namespace ndn {
-shared_ptr<der::DerNode>
+ptr_lib::shared_ptr<der::DerNode>
PublicKey::toDer()
{
ndnboost::iostreams::stream<ndnboost::iostreams::array_source> is((const char*)keyDer_.buf (), keyDer_.size ());
@@ -29,7 +28,7 @@
static int RSA_OID[] = { 1, 2, 840, 113549, 1, 1, 1 };
-shared_ptr<PublicKey>
+ptr_lib::shared_ptr<PublicKey>
PublicKey::fromDer(const Blob& keyDer)
{
// Use a temporary pointer since d2i updates it.
@@ -39,7 +38,7 @@
throw UnrecognizedKeyFormatException("Error decoding public key DER");
RSA_free(publicKey);
- return shared_ptr<PublicKey>(new PublicKey(OID(vector<int>(RSA_OID, RSA_OID + sizeof(RSA_OID))), keyDer));
+ return ptr_lib::shared_ptr<PublicKey>(new PublicKey(OID(vector<int>(RSA_OID, RSA_OID + sizeof(RSA_OID))), keyDer));
}
Blob
diff --git a/src/security/identity/basic-identity-storage.cpp b/src/security/identity/basic-identity-storage.cpp
index 85af9a9..46a98bf 100644
--- a/src/security/identity/basic-identity-storage.cpp
+++ b/src/security/identity/basic-identity-storage.cpp
@@ -26,7 +26,6 @@
INIT_LOGGER("BasicIdentityStorage");
using namespace std;
-using namespace ndn::ptr_lib;
namespace ndn
{
@@ -445,7 +444,7 @@
sqlite3_finalize(statement);
}
-shared_ptr<Data>
+ptr_lib::shared_ptr<Data>
BasicIdentityStorage::getCertificate(const Name &certificateName, bool allowAny)
{
if (doesCertificateExist(certificateName)) {
@@ -469,7 +468,7 @@
int res = sqlite3_step(statement);
- shared_ptr<Data> data(new Data());
+ ptr_lib::shared_ptr<Data> data(new Data());
if (res == SQLITE_ROW)
data->wireDecode((const uint8_t*)sqlite3_column_blob(statement, 0), sqlite3_column_bytes(statement, 0));
@@ -479,7 +478,7 @@
}
else {
_LOG_DEBUG("Certificate does not exist!");
- return shared_ptr<Data>();
+ return ptr_lib::shared_ptr<Data>();
}
}
diff --git a/src/security/identity/identity-manager.cpp b/src/security/identity/identity-manager.cpp
index 28e1d10..88e6782 100644
--- a/src/security/identity/identity-manager.cpp
+++ b/src/security/identity/identity-manager.cpp
@@ -26,7 +26,6 @@
INIT_LOGGER("ndn.security.IdentityManager")
using namespace std;
-using namespace ndn::ptr_lib;
namespace ndn {
@@ -41,7 +40,7 @@
Name keyName = generateRSAKeyPairAsDefault(identityName, true);
_LOG_DEBUG("Create self-signed certificate");
- shared_ptr<IdentityCertificate> selfCert = selfSign(keyName);
+ ptr_lib::shared_ptr<IdentityCertificate> selfCert = selfSign(keyName);
_LOG_DEBUG("Add self-signed certificate as default");
@@ -63,7 +62,7 @@
privateKeyStorage_->generateKeyPair(keyName.toUri(), keyType, keySize);
_LOG_DEBUG("Create a key record in public storage");
- shared_ptr<PublicKey> pubKey = privateKeyStorage_->getPublicKey(keyName.toUri());
+ ptr_lib::shared_ptr<PublicKey> pubKey = privateKeyStorage_->getPublicKey(keyName.toUri());
identityStorage_->addKey(keyName, keyType, pubKey->getKeyDer());
return keyName;
@@ -96,9 +95,9 @@
Name keyName = getKeyNameFromCertificatePrefix(certificatePrefix);
Blob keyBlob = identityStorage_->getKey(keyName);
- shared_ptr<PublicKey> publicKey = PublicKey::fromDer(keyBlob);
+ ptr_lib::shared_ptr<PublicKey> publicKey = PublicKey::fromDer(keyBlob);
- shared_ptr<IdentityCertificate> certificate = createIdentityCertificate
+ ptr_lib::shared_ptr<IdentityCertificate> certificate = createIdentityCertificate
(certificatePrefix, *publicKey, signerCertificateName, notBefore, notAfter);
identityStorage_->addCertificate(*certificate);
@@ -113,7 +112,7 @@
const MillisecondsSince1970& notBefore,
const MillisecondsSince1970& notAfter)
{
- shared_ptr<IdentityCertificate> certificate(new IdentityCertificate());
+ ptr_lib::shared_ptr<IdentityCertificate> certificate(new IdentityCertificate());
Name keyName = getKeyNameFromCertificatePrefix(certificatePrefix);
Name certificateName = certificatePrefix;
@@ -131,7 +130,7 @@
certificate->addSubjectDescription(CertificateSubjectDescription("2.5.4.41", keyName.toUri()));
certificate->encode();
- shared_ptr<Sha256WithRsaSignature> sha256Sig(new Sha256WithRsaSignature());
+ ptr_lib::shared_ptr<Sha256WithRsaSignature> sha256Sig(new Sha256WithRsaSignature());
KeyLocator keyLocator;
keyLocator.setType(ndn_KeyLocatorType_KEYNAME);
@@ -144,7 +143,7 @@
SignedBlob unsignedData = certificate->wireEncode();
- shared_ptr<IdentityCertificate> signerCertificate = getCertificate(signerCertificateName);
+ ptr_lib::shared_ptr<IdentityCertificate> signerCertificate = getCertificate(signerCertificateName);
Name signerkeyName = signerCertificate->getPublicKeyName();
Blob sigBits = privateKeyStorage_->sign(unsignedData, signerkeyName);
@@ -189,12 +188,12 @@
IdentityManager::signByCertificate(const uint8_t* buffer, size_t bufferLength, const Name& certificateName)
{
Name keyName = IdentityCertificate::certificateNameToPublicKeyName(certificateName);
- shared_ptr<PublicKey> publicKey = privateKeyStorage_->getPublicKey(keyName.toUri());
+ ptr_lib::shared_ptr<PublicKey> publicKey = privateKeyStorage_->getPublicKey(keyName.toUri());
Blob sigBits = privateKeyStorage_->sign(buffer, bufferLength, keyName.toUri());
//For temporary usage, we support RSA + SHA256 only, but will support more.
- shared_ptr<Sha256WithRsaSignature> sha256Sig(new Sha256WithRsaSignature());
+ ptr_lib::shared_ptr<Sha256WithRsaSignature> sha256Sig(new Sha256WithRsaSignature());
KeyLocator keyLocator;
keyLocator.setType(ndn_KeyLocatorType_KEYNAME);
@@ -211,7 +210,7 @@
IdentityManager::signByCertificate(Data &data, const Name &certificateName, WireFormat& wireFormat)
{
Name keyName = IdentityCertificate::certificateNameToPublicKeyName(certificateName);
- shared_ptr<PublicKey> publicKey = privateKeyStorage_->getPublicKey(keyName);
+ ptr_lib::shared_ptr<PublicKey> publicKey = privateKeyStorage_->getPublicKey(keyName);
// For temporary usage, we support RSA + SHA256 only, but will support more.
data.setSignature(Sha256WithRsaSignature());
@@ -236,17 +235,17 @@
data.wireEncode(wireFormat);
}
-shared_ptr<IdentityCertificate>
+ptr_lib::shared_ptr<IdentityCertificate>
IdentityManager::selfSign(const Name& keyName)
{
- shared_ptr<IdentityCertificate> certificate(new IdentityCertificate());
+ ptr_lib::shared_ptr<IdentityCertificate> certificate(new IdentityCertificate());
Name certificateName = keyName.getSubName(0, keyName.size() - 1);
certificateName.append("KEY").append(keyName.get(keyName.size() - 1)).append("ID-CERT").append("0");
certificate->setName(certificateName);
Blob keyBlob = identityStorage_->getKey(keyName);
- shared_ptr<PublicKey> publicKey = PublicKey::fromDer(keyBlob);
+ ptr_lib::shared_ptr<PublicKey> publicKey = PublicKey::fromDer(keyBlob);
#if NDN_CPP_HAVE_GMTIME_SUPPORT
time_t nowSeconds = time(NULL);
@@ -268,7 +267,7 @@
certificate->addSubjectDescription(CertificateSubjectDescription("2.5.4.41", keyName.toUri()));
certificate->encode();
- shared_ptr<Sha256WithRsaSignature> sha256Sig(new Sha256WithRsaSignature());
+ ptr_lib::shared_ptr<Sha256WithRsaSignature> sha256Sig(new Sha256WithRsaSignature());
KeyLocator keyLocator;
keyLocator.setType(ndn_KeyLocatorType_KEYNAME);
diff --git a/src/security/identity/memory-identity-storage.cpp b/src/security/identity/memory-identity-storage.cpp
index c5fb409..26341fa 100644
--- a/src/security/identity/memory-identity-storage.cpp
+++ b/src/security/identity/memory-identity-storage.cpp
@@ -14,7 +14,6 @@
#include <ndn-cpp/security/identity/memory-identity-storage.hpp>
using namespace std;
-using namespace ndn::ptr_lib;
namespace ndn {
@@ -64,13 +63,13 @@
if (doesKeyExist(keyName))
throw SecurityException("a key with the same name already exists!");
- keyStore_[keyName.toUri()] = make_shared<KeyRecord>(keyType, publicKeyDer);
+ keyStore_[keyName.toUri()] = ptr_lib::make_shared<KeyRecord>(keyType, publicKeyDer);
}
Blob
MemoryIdentityStorage::getKey(const Name& keyName)
{
- map<string, shared_ptr<KeyRecord> >::iterator record = keyStore_.find(keyName.toUri());
+ map<string, ptr_lib::shared_ptr<KeyRecord> >::iterator record = keyStore_.find(keyName.toUri());
if (record == keyStore_.end())
// Not found. Silently return null.
return Blob();
@@ -130,9 +129,9 @@
map<string, Blob>::iterator record = certificateStore_.find(certificateName.toUri());
if (record == certificateStore_.end())
// Not found. Silently return null.
- return shared_ptr<Data>();
+ return ptr_lib::shared_ptr<Data>();
- shared_ptr<Data> data(new Data());
+ ptr_lib::shared_ptr<Data> data(new Data());
data->wireDecode(*record->second);
return data;
}
diff --git a/src/security/identity/memory-private-key-storage.cpp b/src/security/identity/memory-private-key-storage.cpp
index b2bbcb5..7c3a2e0 100644
--- a/src/security/identity/memory-private-key-storage.cpp
+++ b/src/security/identity/memory-private-key-storage.cpp
@@ -13,7 +13,6 @@
#include <ndn-cpp/security/identity/memory-private-key-storage.hpp>
using namespace std;
-using namespace ndn::ptr_lib;
namespace ndn {
@@ -26,7 +25,7 @@
size_t privateKeyDerLength)
{
publicKeyStore_[keyName.toUri()] = PublicKey::fromDer(Blob(publicKeyDer, publicKeyDerLength));
- privateKeyStore_[keyName.toUri()] = make_shared<RsaPrivateKey>(privateKeyDer, privateKeyDerLength);
+ privateKeyStore_[keyName.toUri()] = ptr_lib::make_shared<RsaPrivateKey>(privateKeyDer, privateKeyDerLength);
}
void
@@ -37,10 +36,10 @@
#endif
}
-shared_ptr<PublicKey>
+ptr_lib::shared_ptr<PublicKey>
MemoryPrivateKeyStorage::getPublicKey(const Name& keyName)
{
- map<string, shared_ptr<PublicKey> >::iterator publicKey = publicKeyStore_.find(keyName.toUri());
+ map<string, ptr_lib::shared_ptr<PublicKey> >::iterator publicKey = publicKeyStore_.find(keyName.toUri());
if (publicKey == publicKeyStore_.end())
throw SecurityException(string("MemoryPrivateKeyStorage: Cannot find public key ") + keyName.toUri());
return publicKey->second;
@@ -59,7 +58,7 @@
unsigned int signatureBitsLength;
// Find the private key and sign.
- map<string, shared_ptr<RsaPrivateKey> >::iterator privateKey = privateKeyStore_.find(keyName.toUri());
+ map<string, ptr_lib::shared_ptr<RsaPrivateKey> >::iterator privateKey = privateKeyStore_.find(keyName.toUri());
if (privateKey == privateKeyStore_.end())
throw SecurityException(string("MemoryPrivateKeyStorage: Cannot find private key ") + keyName.toUri());
if (!RSA_sign(NID_sha256, digest, sizeof(digest), signatureBits, &signatureBitsLength, privateKey->second->getPrivateKey()))
diff --git a/src/security/identity/osx-private-key-storage.cpp b/src/security/identity/osx-private-key-storage.cpp
index aa6b7b8..e504616 100644
--- a/src/security/identity/osx-private-key-storage.cpp
+++ b/src/security/identity/osx-private-key-storage.cpp
@@ -18,7 +18,6 @@
#include <ndn-cpp/security/security-exception.hpp>
using namespace std;
-using namespace ndn::ptr_lib;
INIT_LOGGER("ndn.OSXPrivateKeyStorage");
@@ -124,7 +123,7 @@
throw SecurityException("Fail to create a symmetric key");
}
- shared_ptr<PublicKey> OSXPrivateKeyStorage::getPublicKey(const Name & keyName)
+ ptr_lib::shared_ptr<PublicKey> OSXPrivateKeyStorage::getPublicKey(const Name & keyName)
{
_LOG_TRACE("OSXPrivateKeyStorage::getPublickey");
diff --git a/src/security/key-chain.cpp b/src/security/key-chain.cpp
index fc05969..26dcec8 100644
--- a/src/security/key-chain.cpp
+++ b/src/security/key-chain.cpp
@@ -12,7 +12,6 @@
#include <ndn-cpp/security/key-chain.hpp>
using namespace std;
-using namespace ndn::ptr_lib;
using namespace ndn::func_lib;
#if NDN_CPP_HAVE_STD_FUNCTION
// In the std library, the placeholders are in a different namespace than boost.
@@ -21,7 +20,7 @@
namespace ndn {
-KeyChain::KeyChain(const shared_ptr<IdentityManager>& identityManager, const shared_ptr<PolicyManager>& policyManager)
+KeyChain::KeyChain(const ptr_lib::shared_ptr<IdentityManager>& identityManager, const ptr_lib::shared_ptr<PolicyManager>& policyManager)
: identityManager_(identityManager), policyManager_(policyManager), face_(0), maxSteps_(100)
{
}
@@ -32,7 +31,7 @@
identityManager_->signByCertificate(data, certificateName, wireFormat);
}
-shared_ptr<Signature>
+ptr_lib::shared_ptr<Signature>
KeyChain::sign(const uint8_t* buffer, size_t bufferLength, const Name& certificateName)
{
return identityManager_->signByCertificate(buffer, bufferLength, certificateName);
@@ -62,7 +61,7 @@
identityManager_->signByCertificate(data, signingCertificateName, wireFormat);
}
-shared_ptr<Signature>
+ptr_lib::shared_ptr<Signature>
KeyChain::signByIdentity(const uint8_t* buffer, size_t bufferLength, const Name& identityName)
{
Name signingCertificateName = identityManager_->getDefaultCertificateNameForIdentity(identityName);
@@ -75,12 +74,12 @@
void
KeyChain::verifyData
- (const shared_ptr<Data>& data, const OnVerified& onVerified, const OnVerifyFailed& onVerifyFailed, int stepCount)
+ (const ptr_lib::shared_ptr<Data>& data, const OnVerified& onVerified, const OnVerifyFailed& onVerifyFailed, int stepCount)
{
_LOG_TRACE("Enter Verify");
if (policyManager_->requireVerify(*data)) {
- shared_ptr<ValidationRequest> nextStep = policyManager_->checkVerificationPolicy
+ ptr_lib::shared_ptr<ValidationRequest> nextStep = policyManager_->checkVerificationPolicy
(data, stepCount, onVerified, onVerifyFailed);
if (nextStep)
face_->expressInterest
@@ -95,7 +94,7 @@
}
void
-KeyChain::onCertificateData(const shared_ptr<const Interest> &interest, const shared_ptr<Data> &data, shared_ptr<ValidationRequest> nextStep)
+KeyChain::onCertificateData(const ptr_lib::shared_ptr<const Interest> &interest, const ptr_lib::shared_ptr<Data> &data, ptr_lib::shared_ptr<ValidationRequest> nextStep)
{
// Try to verify the certificate (data) according to the parameters in nextStep.
verifyData(data, nextStep->onVerified_, nextStep->onVerifyFailed_, nextStep->stepCount_);
@@ -103,8 +102,8 @@
void
KeyChain::onCertificateInterestTimeout
- (const shared_ptr<const Interest> &interest, int retry, const OnVerifyFailed& onVerifyFailed, const shared_ptr<Data> &data,
- shared_ptr<ValidationRequest> nextStep)
+ (const ptr_lib::shared_ptr<const Interest> &interest, int retry, const OnVerifyFailed& onVerifyFailed, const ptr_lib::shared_ptr<Data> &data,
+ ptr_lib::shared_ptr<ValidationRequest> nextStep)
{
if (retry > 0)
// Issue the same expressInterest as in verifyData except decrement retry.
diff --git a/src/security/policy/no-verify-policy-manager.cpp b/src/security/policy/no-verify-policy-manager.cpp
index 38cc7fd..b93bdb6 100644
--- a/src/security/policy/no-verify-policy-manager.cpp
+++ b/src/security/policy/no-verify-policy-manager.cpp
@@ -9,7 +9,6 @@
#include <ndn-cpp/security/policy/no-verify-policy-manager.hpp>
using namespace std;
-using namespace ndn::ptr_lib;
namespace ndn {
@@ -29,12 +28,12 @@
return false;
}
-shared_ptr<ValidationRequest>
+ptr_lib::shared_ptr<ValidationRequest>
NoVerifyPolicyManager::checkVerificationPolicy
- (const shared_ptr<Data>& data, int stepCount, const OnVerified& onVerified, const OnVerifyFailed& onVerifyFailed)
+ (const ptr_lib::shared_ptr<Data>& data, int stepCount, const OnVerified& onVerified, const OnVerifyFailed& onVerifyFailed)
{
onVerified(data);
- return shared_ptr<ValidationRequest>();
+ return ptr_lib::shared_ptr<ValidationRequest>();
}
bool
diff --git a/src/security/policy/self-verify-policy-manager.cpp b/src/security/policy/self-verify-policy-manager.cpp
index 025514c..dc4058e 100644
--- a/src/security/policy/self-verify-policy-manager.cpp
+++ b/src/security/policy/self-verify-policy-manager.cpp
@@ -13,7 +13,6 @@
#include <ndn-cpp/security/policy/self-verify-policy-manager.hpp>
using namespace std;
-using namespace ndn::ptr_lib;
namespace ndn {
@@ -77,9 +76,9 @@
return true;
}
-shared_ptr<ValidationRequest>
+ptr_lib::shared_ptr<ValidationRequest>
SelfVerifyPolicyManager::checkVerificationPolicy
- (const shared_ptr<Data>& data, int stepCount, const OnVerified& onVerified, const OnVerifyFailed& onVerifyFailed)
+ (const ptr_lib::shared_ptr<Data>& data, int stepCount, const OnVerified& onVerified, const OnVerifyFailed& onVerifyFailed)
{
// Cast to const Data* so that we use the const version of getSignature() and don't reset the default encoding.
const Sha256WithRsaSignature *signature = dynamic_cast<const Sha256WithRsaSignature*>(((const Data*)data.get())->getSignature());
@@ -111,7 +110,7 @@
onVerifyFailed(data);
// No more steps, so return a null ValidationRequest.
- return shared_ptr<ValidationRequest>();
+ return ptr_lib::shared_ptr<ValidationRequest>();
}
bool
diff --git a/src/security/signature/sha256-with-rsa-handler.cpp b/src/security/signature/sha256-with-rsa-handler.cpp
index 905fc3e..ce6d249 100644
--- a/src/security/signature/sha256-with-rsa-handler.cpp
+++ b/src/security/signature/sha256-with-rsa-handler.cpp
@@ -11,7 +11,6 @@
#include <ndn-cpp/security/signature/sha256-with-rsa-handler.hpp>
using namespace std;
-using namespace ndn::ptr_lib;
namespace ndn {