Fixing usages of ptr_lib::shared_ptr

In certain cases, importing both std:: and ndn::ptr_lib namespaces
causes ambiguity for shared_ptr type.

Change-Id: Iddc02353e1615b2387277c56185a1dd873d54459
diff --git a/src/security/key-chain.cpp b/src/security/key-chain.cpp
index e3980a9..704f044 100644
--- a/src/security/key-chain.cpp
+++ b/src/security/key-chain.cpp
@@ -16,7 +16,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.
@@ -25,7 +24,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)
 {  
 }
@@ -36,7 +35,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);
@@ -66,7 +65,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);
@@ -79,12 +78,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
@@ -99,7 +98,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_);
@@ -107,8 +106,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.