blob: 5c9cabb5936aaae682d3b66d39866384c8bbca0c [file] [log] [blame]
akmhoqueba094742014-02-28 11:47:21 -06001#ifndef NLSR_CERT_STORE_HPP
2#define NLSR_CERT_STORE_HPP
3
akmhoqueeb764c52014-03-11 16:01:09 -05004#include<list>
5#include <ndn-cpp-dev/security/identity-certificate.hpp>
6#include "nlsr_cse.hpp"
akmhoqueba094742014-02-28 11:47:21 -06007
akmhoqueeb764c52014-03-11 16:01:09 -05008namespace nlsr
9{
akmhoque5a44dd42014-03-12 18:11:32 -050010 class NlsrCertificateStore
11 {
12 public:
13 NlsrCertificateStore()
14 {}
15
16 bool addCertificate(NlsrCertificateStoreEntry & ncse);
17 bool addCertificate(ndn::shared_ptr<ndn::IdentityCertificate> pcert
18 , uint32_t csn, bool isv);
19 std::pair<ndn::shared_ptr<ndn::IdentityCertificate>, bool>
20 getCertificateFromStore(const std::string certName);
21 std::pair<ndn::shared_ptr<ndn::IdentityCertificate>, bool>
22 getCertificateFromStore(const std::string certName, int checkSeqNum);
23 bool removeCertificateFromStroe(const std::string certName);
24 bool isCertificateNewInStore(const std::string certName, int checkSeqNo);
25 void printCertStore();
26 private:
27 std::list<NlsrCertificateStoreEntry> certTable;
28 };
akmhoqueeb764c52014-03-11 16:01:09 -050029}
akmhoqueba094742014-02-28 11:47:21 -060030
31#endif