9 #ifndef NDN_SECURITY_CERTIFICATE_HPP
10 #define NDN_SECURITY_CERTIFICATE_HPP
12 #include "../common.hpp"
13 #include "../data.hpp"
23 class Error :
public std::runtime_error
28 : std::runtime_error(what)
209 #endif //NDN_SECURITY_CERTIFICATE_HPP
time::system_clock::TimePoint & getNotBefore()
Error(const std::string &what)
ExtensionList m_extensionList
time::system_clock::TimePoint & getNotAfter()
void addSubjectDescription(const CertificateSubjectDescription &description)
Add a subject description.
void wireDecode(const Block &wire)
Decode from the wire format.
void addExtension(const CertificateExtension &extension)
Add a certificate extension.
std::vector< CertificateExtension > ExtensionList
A CertificateSubjectDescription represents the SubjectDescription entry in a Certificate.
const SubjectDescriptionList & getSubjectDescriptionList() const
void wireDecode(const Block &wire)
Class representing wire element of the NDN packet.
Certificate()
The default constructor.
const time::system_clock::TimePoint & getNotAfter() const
PublicKey & getPublicKeyInfo()
const ExtensionList & getExtensionList() const
time::system_clock::TimePoint m_notAfter
void setNotBefore(const time::system_clock::TimePoint ¬Before)
bool isTooLate()
Check if the certificate is valid.
void encode()
encode certificate info into content
const PublicKey & getPublicKeyInfo() const
time::system_clock::TimePoint m_notBefore
bool isTooEarly()
Check if the certificate is valid.
SubjectDescriptionList m_subjectDescriptionList
SubjectDescriptionList & getSubjectDescriptionList()
std::vector< CertificateSubjectDescription > SubjectDescriptionList
virtual ~Certificate()
The virtual destructor.
ExtensionList & getExtensionList()
const time::system_clock::TimePoint & getNotBefore() const
A CertificateExtension represents the Extension entry in a certificate.
std::ostream & operator<<(std::ostream &os, const Data &data)
void printCertificate(std::ostream &os) const
void setNotAfter(const time::system_clock::TimePoint ¬After)
void setPublicKeyInfo(const PublicKey &key)