#include <identity-certificate.hpp>


Classes | |
| class | Error |
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 |
Public Member Functions inherited from ndn::security::v1::Certificate | |
| 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 | wireDecode (const Block &wire) |
| 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 |
Public Member Functions inherited from ndn::Data | |
| Data () | |
| Create an empty Data object. More... | |
| Data (const Name &name) | |
| Create a new Data object with the given name. More... | |
| Data (const Block &wire) | |
| Create a new Data object from wire encoding. More... | |
| 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... | |
| void | wireDecode (const Block &wire) |
| Decode from the wire format. More... | |
| bool | hasWire () const |
| Check if Data is already has wire encoding. More... | |
| const Name & | getName () const |
| Get name of the Data packet. More... | |
| Data & | setName (const Name &name) |
| Set name to a copy of the given Name. 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 |
Public Member Functions inherited from ndn::TagHost | |
| 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 Attributes | |
| Name | m_publicKeyName |
Protected Attributes inherited from ndn::security::v1::Certificate | |
| SubjectDescriptionList | m_subjectDescriptionList |
| time::system_clock::TimePoint | m_notBefore |
| time::system_clock::TimePoint | m_notAfter |
| PublicKey | m_key |
| ExtensionList | m_extensionList |
Additional Inherited Members | |
Public Types inherited from ndn::security::v1::Certificate | |
| typedef std::vector< CertificateSubjectDescription > | SubjectDescriptionList |
| typedef std::vector< CertificateExtension > | ExtensionList |
Protected Member Functions inherited from ndn::security::v1::Certificate | |
| void | decode () |
Protected Member Functions inherited from ndn::Data | |
| void | onChanged () |
| Clear the wire encoding. More... | |
Definition at line 34 of file identity-certificate.hpp.
| ndn::security::v1::IdentityCertificate::IdentityCertificate | ( | ) |
The default constructor.
Definition at line 36 of file identity-certificate.cpp.
References ndn::Data::setFreshnessPeriod().
Referenced by ndn::security::v1::IdentityCertificate::Error::Error().
|
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.
| void ndn::security::v1::IdentityCertificate::wireDecode | ( | const Block & | wire | ) |
Definition at line 54 of file identity-certificate.cpp.
References ndn::security::v1::Certificate::wireDecode().
Referenced by ndn::security::v1::IdentityCertificate::Error::Error(), and ndn::security::SecuredBag::wireDecode().
| void ndn::security::v1::IdentityCertificate::setName | ( | const Name & | name | ) |
Definition at line 61 of file identity-certificate.cpp.
References certificateNameToPublicKeyName(), ndn::Name::get(), ndn::Data::getName(), m_publicKeyName, ndn::Data::setName(), ndn::Name::size(), and ndn::name::Component::toUri().
Referenced by ndn::security::v1::IdentityCertificate::Error::Error().
|
inline |
Definition at line 73 of file identity-certificate.hpp.
References certificateNameToPublicKeyName(), isIdentityCertificate(), and m_publicKeyName.
Referenced by ndn::security::PibMemory::addCertificate(), ndn::security::PibSqlite3::addCertificate(), and ndn::security::KeyChain::selfSign().
|
static |
Definition at line 103 of file identity-certificate.cpp.
Referenced by getPublicKeyName().
|
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.
References ndn::Name::append(), ndn::Name::get(), ndn::Name::getSubName(), ndn::Name::size(), ndn::name::Component::toUri(), and ndn::Name::toUri().
Referenced by ndn::security::SecPublicInfoSqlite3::addCertificate(), ndn::security::SecPublicInfo::addCertificateAsIdentityDefault(), ndn::security::SecPublicInfo::addCertificateAsSystemDefault(), ndn::security::ValidatorConfig::checkPolicy(), ndn::security::CommandInterestValidator::checkPolicy(), ndn::security::SecPublicInfoSqlite3::getDefaultCertificateNameForKey(), getPublicKeyName(), ndn::security::KeyChain::importIdentity(), nfd::CommandAuthenticator::makeAuthorization(), ndn::security::PibMemory::removeCertificate(), and setName().
|
protected |
Definition at line 97 of file identity-certificate.hpp.
Referenced by getPublicKeyName(), and setName().