blob: 5c9cabb5936aaae682d3b66d39866384c8bbca0c [file] [log] [blame]
#ifndef NLSR_CERT_STORE_HPP
#define NLSR_CERT_STORE_HPP
#include<list>
#include <ndn-cpp-dev/security/identity-certificate.hpp>
#include "nlsr_cse.hpp"
namespace nlsr
{
class NlsrCertificateStore
{
public:
NlsrCertificateStore()
{}
bool addCertificate(NlsrCertificateStoreEntry & ncse);
bool addCertificate(ndn::shared_ptr<ndn::IdentityCertificate> pcert
, uint32_t csn, bool isv);
std::pair<ndn::shared_ptr<ndn::IdentityCertificate>, bool>
getCertificateFromStore(const std::string certName);
std::pair<ndn::shared_ptr<ndn::IdentityCertificate>, bool>
getCertificateFromStore(const std::string certName, int checkSeqNum);
bool removeCertificateFromStroe(const std::string certName);
bool isCertificateNewInStore(const std::string certName, int checkSeqNo);
void printCertStore();
private:
std::list<NlsrCertificateStoreEntry> certTable;
};
}
#endif