akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 1 | #ifndef NLSR_CERT_STORE_HPP |
| 2 | #define NLSR_CERT_STORE_HPP |
| 3 | |
akmhoque | eb764c5 | 2014-03-11 16:01:09 -0500 | [diff] [blame] | 4 | #include<list> |
| 5 | #include <ndn-cpp-dev/security/identity-certificate.hpp> |
| 6 | #include "nlsr_cse.hpp" |
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 7 | |
akmhoque | eb764c5 | 2014-03-11 16:01:09 -0500 | [diff] [blame] | 8 | namespace nlsr |
| 9 | { |
| 10 | 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 | }; |
| 29 | } |
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 30 | |
| 31 | #endif |