#include <identity-certificate.hpp>
Data Structures | |
class | Error |
Public Types | |
typedef std::vector< CertificateSubjectDescription > | SubjectDescriptionList |
typedef std::vector< CertificateExtension > | ExtensionList |
Public Member Functions | |
IdentityCertificate () | |
The default constructor. More... | |
IdentityCertificate (const Data &data) | |
Create an IdentityCertificate from the content in the data packet. More... | |
IdentityCertificate (const Block &block) | |
Create an IdentityCertificate from a block. More... | |
void | wireDecode (const Block &wire) |
void | setName (const Name &name) |
const Name & | getPublicKeyName () const |
void | encode () |
encode certificate info into content More... | |
void | addSubjectDescription (const CertificateSubjectDescription &description) |
Add a subject description. More... | |
const SubjectDescriptionList & | getSubjectDescriptionList () const |
SubjectDescriptionList & | getSubjectDescriptionList () |
void | addExtension (const CertificateExtension &extension) |
Add a certificate extension. More... | |
const ExtensionList & | getExtensionList () const |
ExtensionList & | getExtensionList () |
void | setNotBefore (const time::system_clock::TimePoint ¬Before) |
time::system_clock::TimePoint & | getNotBefore () |
const time::system_clock::TimePoint & | getNotBefore () const |
void | setNotAfter (const time::system_clock::TimePoint ¬After) |
time::system_clock::TimePoint & | getNotAfter () |
const time::system_clock::TimePoint & | getNotAfter () const |
void | setPublicKeyInfo (const PublicKey &key) |
PublicKey & | getPublicKeyInfo () |
const PublicKey & | getPublicKeyInfo () const |
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<encoding::Tag TAG> | |
size_t | wireEncode (EncodingImpl< TAG > &encoder, bool wantUnsignedPortionOnly=false) const |
Fast encoding or block size estimation. More... | |
const Block & | wireEncode () const |
Encode to a wire format. More... | |
const Block & | wireEncode (EncodingBuffer &encoder, const Block &signatureValue) const |
Finalize Data packet encoding with the specified SignatureValue. More... | |
bool | hasWire () const |
Check if Data is already has wire encoding. More... | |
const Name & | getName () const |
Get name of the Data packet. More... | |
const Name & | getFullName () const |
Get full name of Data packet, including the implicit digest. More... | |
const MetaInfo & | getMetaInfo () const |
Get MetaInfo block from Data packet. More... | |
Data & | setMetaInfo (const MetaInfo &metaInfo) |
Set metaInfo to a copy of the given MetaInfo. More... | |
uint32_t | getContentType () const |
Data & | setContentType (uint32_t type) |
const time::milliseconds & | getFreshnessPeriod () const |
Data & | setFreshnessPeriod (const time::milliseconds &freshnessPeriod) |
const name::Component & | getFinalBlockId () const |
Data & | setFinalBlockId (const name::Component &finalBlockId) |
const Block & | getContent () const |
Get content Block. More... | |
Data & | setContent (const uint8_t *buffer, size_t bufferSize) |
Set the content from the buffer (buffer will be copied) More... | |
Data & | setContent (const Block &block) |
Set the content from the block. More... | |
Data & | setContent (const ConstBufferPtr &contentValue) |
Set the content from the pointer to immutable buffer. More... | |
const Signature & | getSignature () const |
Data & | setSignature (const Signature &signature) |
Set the signature to a copy of the given signature. More... | |
Data & | setSignatureValue (const Block &value) |
bool | operator== (const Data &other) const |
bool | operator!= (const Data &other) const |
template<typename T > | |
shared_ptr< T > | getTag () const |
get a tag item More... | |
template<typename T > | |
void | setTag (shared_ptr< T > tag) const |
set a tag item More... | |
template<typename T > | |
void | removeTag () const |
remove tag item More... | |
Static Public Member Functions | |
static bool | isIdentityCertificate (const Certificate &certificate) |
static Name | certificateNameToPublicKeyName (const Name &certificateName) |
Get the public key name from the full certificate name. More... | |
Protected Member Functions | |
void | decode () |
void | onChanged () |
Clear the wire encoding. More... | |
Definition at line 34 of file v1/identity-certificate.hpp.
|
inherited |
Definition at line 53 of file v1/certificate.hpp.
|
inherited |
Definition at line 52 of file v1/certificate.hpp.
ndn::security::v1::IdentityCertificate::IdentityCertificate | ( | ) |
The default constructor.
Definition at line 36 of file identity-certificate.cpp.
|
explicit |
Create an IdentityCertificate from the content in the data packet.
data | The data packet with the content to decode. |
Definition at line 41 of file identity-certificate.cpp.
|
explicit |
Create an IdentityCertificate from a block.
block | The raw block of the certificate. |
Definition at line 47 of file identity-certificate.cpp.
|
inlineinherited |
Add a certificate extension.
extension | the extension to be added |
Definition at line 113 of file v1/certificate.hpp.
|
inlineinherited |
Add a subject description.
description | The description to be added. |
Definition at line 91 of file v1/certificate.hpp.
|
static |
Get the public key name from the full certificate name.
certificateName | The full certificate name. |
Definition at line 109 of file identity-certificate.cpp.
|
protectedinherited |
Definition at line 197 of file v1/certificate.cpp.
|
inherited |
encode certificate info into content
Definition at line 94 of file v1/certificate.cpp.
|
inherited |
|
inlineinherited |
|
inlineinherited |
Definition at line 119 of file v1/certificate.hpp.
|
inlineinherited |
Definition at line 125 of file v1/certificate.hpp.
|
inlineinherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Definition at line 155 of file v1/certificate.hpp.
|
inlineinherited |
Definition at line 161 of file v1/certificate.hpp.
|
inlineinherited |
Definition at line 137 of file v1/certificate.hpp.
|
inlineinherited |
Definition at line 143 of file v1/certificate.hpp.
|
inlineinherited |
Definition at line 173 of file v1/certificate.hpp.
|
inlineinherited |
Definition at line 179 of file v1/certificate.hpp.
|
inline |
Definition at line 73 of file v1/identity-certificate.hpp.
|
inlineinherited |
|
inlineinherited |
Definition at line 97 of file v1/certificate.hpp.
|
inlineinherited |
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 |
|
static |
Definition at line 103 of file identity-certificate.cpp.
|
inherited |
Check if the certificate is valid.
Definition at line 76 of file v1/certificate.cpp.
|
inherited |
Check if the certificate is valid.
Definition at line 85 of file v1/certificate.cpp.
|
protectedinherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 269 of file v1/certificate.cpp.
|
inlineinherited |
remove tag item
Definition at line 94 of file tag-host.hpp.
|
inherited |
Set the content from the block.
Depending on type of the supplied block, there are two cases:
block | The Block containing the content to assign |
|
inherited |
Set the content from the pointer to immutable buffer.
This method will create a Block with tlv::Content and set contentValue as a payload for this block. Note that this method is very different from setContent(const Block&), since it does not require that payload should be a valid TLV element.
contentValue | The pointer to immutable buffer containing the content to assign |
|
inherited |
|
inherited |
|
inherited |
void ndn::security::v1::IdentityCertificate::setName | ( | const Name & | name | ) |
Definition at line 61 of file identity-certificate.cpp.
|
inlineinherited |
Definition at line 149 of file v1/certificate.hpp.
|
inlineinherited |
Definition at line 131 of file v1/certificate.hpp.
|
inlineinherited |
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::IdentityCertificate::wireDecode | ( | const Block & | wire | ) |
Definition at line 54 of file identity-certificate.cpp.
|
inherited |
Fast encoding or block size estimation.
encoder | EncodingEstimator or EncodingBuffer instance |
wantUnsignedPortionOnly | Request only unsigned portion to be encoded in block. If true, only Name, MetaInfo, Content, and SignatureInfo blocks will be encoded into the block. Note that there will be no outer TLV header of the Data packet. |
|
inherited |
|
inherited |
Finalize Data packet encoding with the specified SignatureValue.
encoder | EncodingBuffer instance, containing Name, MetaInfo, Content, and SignatureInfo (without outer TLV header of the Data packet). |
signatureValue | SignatureValue block to be added to Data packet to finalize the wire encoding |
This method is intended to be used in concert with Data::wireEncode(EncodingBuffer&, true) method to optimize Data packet wire format creation:
Data data; ... EncodingBuffer encoder; data.wireEncode(encoder, true); ... Block signatureValue = <sign_over_unsigned_portion>(encoder.buf(), encoder.size()); data.wireEncode(encoder, signatureValue)
|
protectedinherited |
Definition at line 210 of file v1/certificate.hpp.
|
protectedinherited |
Definition at line 209 of file v1/certificate.hpp.
|
protectedinherited |
Definition at line 208 of file v1/certificate.hpp.
|
protectedinherited |
Definition at line 207 of file v1/certificate.hpp.
|
protected |
Definition at line 97 of file v1/identity-certificate.hpp.
|
protectedinherited |
Definition at line 206 of file v1/certificate.hpp.