blob: 1257129d631674e5be7d1e263936e19656a38664 [file] [log] [blame]
#ifndef NLSR_CERT_STORE_ENTRY_HPP
#define NLSR_CERT_STORE_ENTRY_HPP
#include <iostream>
#include <ndn-cpp-dev/face.hpp>
#include <ndn-cpp-dev/security/identity-certificate.hpp>
namespace nlsr {
class CertificateStoreEntry
{
public:
CertificateStoreEntry()
: m_cert(ndn::make_shared<ndn::IdentityCertificate>())
, m_certSeqNum(0)
, m_isSignerVerified(false)
{}
CertificateStoreEntry(ndn::shared_ptr<ndn::IdentityCertificate> pcert
, uint32_t csn, bool isv)
: m_cert(pcert)
, m_certSeqNum(csn)
, m_isSignerVerified(isv)
{}
ndn::shared_ptr<ndn::IdentityCertificate>
getCert() const
{
return m_cert;
}
void
setCert(ndn::shared_ptr<ndn::IdentityCertificate> pcert)
{
m_cert = pcert;
}
uint32_t
getCertSeqNum() const
{
return m_certSeqNum;
}
void
setCertSeqNum(uint32_t csn)
{
m_certSeqNum = csn;
}
bool
getIsSignerVerified() const
{
return m_isSignerVerified;
}
void
setIsSignerVerified(bool isv)
{
m_isSignerVerified = isv;
}
private:
ndn::shared_ptr<ndn::IdentityCertificate> m_cert;
uint32_t m_certSeqNum;
bool m_isSignerVerified;
};
/* Debugging Purpose */
std::ostream&
operator <<(std::ostream& os, const CertificateStoreEntry& ncse);
}//namespace NLSR
#endif //NLSR_CERT_STORE_ENTRY_HPP