Fixing Coding Style
diff --git a/src/security/nlsr_cert_store.cpp b/src/security/nlsr_cert_store.cpp
index 897d44a..fa84ad9 100644
--- a/src/security/nlsr_cert_store.cpp
+++ b/src/security/nlsr_cert_store.cpp
@@ -4,6 +4,8 @@
#include "nlsr_wle.hpp"
#include "nlsr_km.hpp"
+#define THIS_FILE "nlsr_cert_store.cpp"
+
namespace nlsr
{
static bool
@@ -36,7 +38,7 @@
ndn::Name tmpName(respCertName);
respCertName=tmpName.getPrefix(-1).toUri();
std::pair<WaitingListEntry, bool> chkWle=
- waitingList.getWaitingListEntry(respCertName);
+ m_waitingList.getWaitingListEntry(respCertName);
if( chkWle.second )
{
std::pair<ndn::shared_ptr<ndn::IdentityCertificate>, bool> sc=
@@ -62,7 +64,7 @@
}
//remove that entry from waiting list
- waitingList.removeFromWaitingList(respCertName);
+ m_waitingList.remove(respCertName);
}
void
@@ -75,7 +77,7 @@
else
{
ndn::SignatureSha256WithRsa signature(ncse.getCert()->getSignature());
- waitingList.addtoWaitingList(signature.getKeyLocator().getName().toUri(),
+ m_waitingList.add(signature.getKeyLocator().getName().toUri(),
ncse.getCert()->getName().toUri());
}
}
@@ -84,20 +86,20 @@
NlsrCertificateStore::addCertificate(NlsrCertificateStoreEntry & ncse)
{
std::list<NlsrCertificateStoreEntry>::iterator it =
- std::find_if( certTable.begin(), certTable.end(),
+ std::find_if( m_certTable.begin(), m_certTable.end(),
bind(&nlsrCertificateStoreEntryCompare, _1, ncse));
- if(it == certTable.end())
+ if(it == m_certTable.end())
{
- certTable.push_back(ncse);
+ m_certTable.push_back(ncse);
updateWaitingList(ncse);
return true;
}
- else if( it != certTable.end() )
+ else if( it != m_certTable.end() )
{
if ( (*it).getCertSeqNum() < ncse.getCertSeqNum() )
{
- certTable.erase(it);
- certTable.push_back(ncse);
+ m_certTable.erase(it);
+ m_certTable.push_back(ncse);
updateWaitingList(ncse);
return true;
}
@@ -117,9 +119,9 @@
NlsrCertificateStore::getCertificateSeqNum(std::string certName)
{
std::list<NlsrCertificateStoreEntry>::iterator it =
- std::find_if( certTable.begin(), certTable.end(),
+ std::find_if( m_certTable.begin(), m_certTable.end(),
bind(&nlsrCertificateStoreEntryCompareByName, _1, certName));
- if(it == certTable.end())
+ if(it == m_certTable.end())
{
return std::make_pair(0,false);
}
@@ -133,9 +135,9 @@
bool isVerified)
{
std::list<NlsrCertificateStoreEntry>::iterator it =
- std::find_if( certTable.begin(), certTable.end(),
+ std::find_if( m_certTable.begin(), m_certTable.end(),
bind(&nlsrCertificateStoreEntryCompareByName, _1, certName));
- if(it != certTable.end())
+ if(it != m_certTable.end())
{
it->setIsSignerVerified(true);
}
@@ -145,9 +147,9 @@
NlsrCertificateStore::getCertificateIsVerified( std::string certName )
{
std::list<NlsrCertificateStoreEntry>::iterator it =
- std::find_if( certTable.begin(), certTable.end(),
+ std::find_if( m_certTable.begin(), m_certTable.end(),
bind(&nlsrCertificateStoreEntryCompareByName, _1, certName));
- if(it != certTable.end())
+ if(it != m_certTable.end())
{
return it->getIsSignerVerified();
}
@@ -159,9 +161,9 @@
NlsrCertificateStore::getCertificateFromStore(const std::string certName)
{
std::list<NlsrCertificateStoreEntry>::iterator it =
- std::find_if( certTable.begin(), certTable.end(),
+ std::find_if( m_certTable.begin(), m_certTable.end(),
bind(&nlsrCertificateStoreEntryCompareByName, _1, certName));
- if(it == certTable.end())
+ if(it == m_certTable.end())
{
ndn::shared_ptr<ndn::IdentityCertificate> cert=
ndn::make_shared<ndn::IdentityCertificate>();
@@ -175,9 +177,9 @@
const std::string certName, int checkSeqNum)
{
std::list<NlsrCertificateStoreEntry>::iterator it =
- std::find_if( certTable.begin(), certTable.end(),
+ std::find_if( m_certTable.begin(), m_certTable.end(),
bind(&nlsrCertificateStoreEntryCompareByName, _1, certName));
- if(it == certTable.end())
+ if(it == m_certTable.end())
{
ndn::shared_ptr<ndn::IdentityCertificate> cert=
ndn::make_shared<ndn::IdentityCertificate>();
@@ -198,9 +200,9 @@
int checkSeqNo)
{
std::list<NlsrCertificateStoreEntry>::iterator it =
- std::find_if( certTable.begin(), certTable.end(),
+ std::find_if( m_certTable.begin(), m_certTable.end(),
bind(&nlsrCertificateStoreEntryCompareByName, _1, certName));
- if(it != certTable.end())
+ if(it != m_certTable.end())
{
return (*it).getCertSeqNum() < checkSeqNo ;
}
@@ -211,24 +213,24 @@
NlsrCertificateStore::removeCertificateFromStroe(const std::string certName)
{
std::list<NlsrCertificateStoreEntry>::iterator it =
- std::find_if( certTable.begin(), certTable.end(),
+ std::find_if( m_certTable.begin(), m_certTable.end(),
bind(&nlsrCertificateStoreEntryCompareByName, _1, certName));
- if(it != certTable.end())
+ if(it != m_certTable.end())
{
- certTable.erase(it);
+ m_certTable.erase(it);
return true;
}
return false;
}
void
- NlsrCertificateStore::printCertStore()
+ NlsrCertificateStore::print()
{
std::list<NlsrCertificateStoreEntry>::iterator it;
- for(it=certTable.begin(); it!=certTable.end(); ++it)
+ for(it=m_certTable.begin(); it!=m_certTable.end(); ++it)
{
std::cout<<(*it)<<std::endl;
}
- std::cout<<waitingList<<std::endl;
+ std::cout<<m_waitingList<<std::endl;
}
}