#include <certificate.hpp>
Classes | |
class | Error |
Public Types | |
typedef std::vector< CertificateExtension > | ExtensionList |
typedef std::vector< CertificateSubjectDescription > | SubjectDescriptionList |
Public Member Functions | |
Certificate () | |
The default constructor. More... | |
Certificate (const Data &data) | |
Create a Certificate from the content in the data packet. More... | |
Certificate (const Block &block) | |
Create a Certificate from the a block. More... | |
virtual | ~Certificate () |
void | addExtension (const CertificateExtension &extension) |
Add a certificate extension. More... | |
void | addSubjectDescription (const CertificateSubjectDescription &description) |
Add a subject description. More... | |
void | encode () |
encode certificate info into content More... | |
const Block & | getContent () const |
Get Content. More... | |
uint32_t | getContentType () const |
const ExtensionList & | getExtensionList () const |
ExtensionList & | getExtensionList () |
const name::Component & | getFinalBlockId () const |
const time::milliseconds & | getFreshnessPeriod () const |
const Name & | getFullName () const |
Get full name including implicit digest. More... | |
const MetaInfo & | getMetaInfo () const |
Get MetaInfo. More... | |
const Name & | getName () const |
Get name. More... | |
time::system_clock::TimePoint & | getNotAfter () |
const time::system_clock::TimePoint & | getNotAfter () const |
time::system_clock::TimePoint & | getNotBefore () |
const time::system_clock::TimePoint & | getNotBefore () const |
PublicKey & | getPublicKeyInfo () |
const PublicKey & | getPublicKeyInfo () const |
const Signature & | getSignature () const |
Get Signature. More... | |
const SubjectDescriptionList & | getSubjectDescriptionList () const |
SubjectDescriptionList & | getSubjectDescriptionList () |
template<typename T > | |
shared_ptr< T > | getTag () const |
get a tag item More... | |
bool | hasWire () const |
Check if already has wire. More... | |
bool | isTooEarly () |
Check if the certificate is valid. More... | |
bool | isTooLate () |
Check if the certificate is valid. More... | |
void | printCertificate (std::ostream &os, const std::string &indent="") const |
template<typename T > | |
void | removeTag () const |
remove tag item More... | |
Data & | setContent (const Block &block) |
Set Content from a block. More... | |
Data & | setContent (const uint8_t *value, size_t valueSize) |
Copy Content value from raw buffer. More... | |
Data & | setContent (const ConstBufferPtr &value) |
Set Content from wire buffer. More... | |
Data & | setContentType (uint32_t type) |
Data & | setFinalBlockId (const name::Component &finalBlockId) |
Data & | setFreshnessPeriod (const time::milliseconds &freshnessPeriod) |
Data & | setMetaInfo (const MetaInfo &metaInfo) |
Set MetaInfo. More... | |
Data & | setName (const Name &name) |
Set name. More... | |
void | setNotAfter (const time::system_clock::TimePoint ¬After) |
void | setNotBefore (const time::system_clock::TimePoint ¬Before) |
void | setPublicKeyInfo (const PublicKey &key) |
Data & | setSignature (const Signature &signature) |
Set Signature. More... | |
Data & | setSignatureValue (const Block &value) |
Set SignatureValue. More... | |
template<typename T > | |
void | setTag (shared_ptr< T > tag) const |
set a tag item More... | |
void | wireDecode (const Block &wire) |
template<encoding::Tag TAG> | |
size_t | wireEncode (EncodingImpl< TAG > &encoder, bool wantUnsignedPortionOnly=false) const |
Fast encoding or block size estimation. More... | |
const Block & | wireEncode (EncodingBuffer &encoder, const Block &signatureValue) const |
Finalize Data packet encoding with the specified SignatureValue. More... | |
const Block & | wireEncode () const |
Encode to a wire format. More... | |
Protected Member Functions | |
void | decode () |
void | resetWire () |
Clear wire encoding and cached FullName. More... | |
Protected Attributes | |
ExtensionList | m_extensionList |
PublicKey | m_key |
time::system_clock::TimePoint | m_notAfter |
time::system_clock::TimePoint | m_notBefore |
SubjectDescriptionList | m_subjectDescriptionList |
Definition at line 39 of file v1/certificate.hpp.
typedef std::vector<CertificateExtension> ndn::security::v1::Certificate::ExtensionList |
Definition at line 53 of file v1/certificate.hpp.
typedef std::vector<CertificateSubjectDescription> ndn::security::v1::Certificate::SubjectDescriptionList |
Definition at line 52 of file v1/certificate.hpp.
ndn::security::v1::Certificate::Certificate | ( | ) |
The default constructor.
Definition at line 45 of file v1/certificate.cpp.
|
explicit |
Create a Certificate from the content in the data packet.
data | The data packet with the content to decode. |
Definition at line 51 of file v1/certificate.cpp.
|
explicit |
Create a Certificate from the a block.
block | The raw block of the certificate |
Definition at line 58 of file v1/certificate.cpp.
|
virtual |
Definition at line 64 of file v1/certificate.cpp.
|
inline |
Add a certificate extension.
extension | the extension to be added |
Definition at line 113 of file v1/certificate.hpp.
|
inline |
Add a subject description.
description | The description to be added. |
Definition at line 91 of file v1/certificate.hpp.
|
protected |
Definition at line 197 of file v1/certificate.cpp.
void ndn::security::v1::Certificate::encode | ( | ) |
encode certificate info into content
Definition at line 94 of file v1/certificate.cpp.
|
inherited |
|
inlineinherited |
|
inline |
Definition at line 119 of file v1/certificate.hpp.
|
inline |
Definition at line 125 of file v1/certificate.hpp.
|
inlineinherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
Definition at line 155 of file v1/certificate.hpp.
|
inline |
Definition at line 161 of file v1/certificate.hpp.
|
inline |
Definition at line 137 of file v1/certificate.hpp.
|
inline |
Definition at line 143 of file v1/certificate.hpp.
|
inline |
Definition at line 173 of file v1/certificate.hpp.
|
inline |
Definition at line 179 of file v1/certificate.hpp.
|
inlineinherited |
|
inline |
Definition at line 97 of file v1/certificate.hpp.
|
inline |
Definition at line 103 of file v1/certificate.hpp.
|
inlineinherited |
get a tag item
T | type of the tag, which must be a subclass of ndn::Tag |
nullptr | if no Tag of type T is stored |
Definition at line 67 of file tag-host.hpp.
|
inlineinherited |
bool ndn::security::v1::Certificate::isTooEarly | ( | ) |
Check if the certificate is valid.
Definition at line 76 of file v1/certificate.cpp.
bool ndn::security::v1::Certificate::isTooLate | ( | ) |
Check if the certificate is valid.
Definition at line 85 of file v1/certificate.cpp.
void ndn::security::v1::Certificate::printCertificate | ( | std::ostream & | os, |
const std::string & | indent = "" |
||
) | const |
Definition at line 269 of file v1/certificate.cpp.
|
inlineinherited |
remove tag item
Definition at line 94 of file tag-host.hpp.
|
protectedinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inline |
Definition at line 149 of file v1/certificate.hpp.
|
inline |
Definition at line 131 of file v1/certificate.hpp.
|
inline |
Definition at line 167 of file v1/certificate.hpp.
|
inlineinherited |
set a tag item
T | type of the tag, which must be a subclass of ndn::Tag |
Definition at line 80 of file tag-host.hpp.
void ndn::security::v1::Certificate::wireDecode | ( | const Block & | wire | ) |
Definition at line 69 of file v1/certificate.cpp.
|
inherited |
Fast encoding or block size estimation.
encoder | EncodingEstimator or EncodingBuffer instance |
wantUnsignedPortionOnly | If true, only prepends Name, MetaInfo, Content, and SignatureInfo to encoder , but omit SignatureValue and outmost Type-Length of Data element. This is intended to be used with wireEncode(encoder, signatureValue). |
Error | SignatureBits are not provided and wantUnsignedPortionOnly is false. |
|
inherited |
Finalize Data packet encoding with the specified SignatureValue.
encoder | EncodingBuffer containing Name, MetaInfo, Content, and SignatureInfo, but without SignatureValue or outmost Type-Length of Data element |
signatureValue | SignatureValue element |
This method is intended to be used in concert with Data::wireEncode(encoder, true)
|
inherited |
|
protected |
Definition at line 210 of file v1/certificate.hpp.
|
protected |
Definition at line 209 of file v1/certificate.hpp.
|
protected |
Definition at line 208 of file v1/certificate.hpp.
|
protected |
Definition at line 207 of file v1/certificate.hpp.
|
protected |
Definition at line 206 of file v1/certificate.hpp.