#include <signature-info.hpp>
Classes | |
class | Error |
Public Member Functions | |
SignatureInfo () | |
SignatureInfo (tlv::SignatureTypeValue type) | |
SignatureInfo (tlv::SignatureTypeValue type, const KeyLocator &keyLocator) | |
SignatureInfo (const Block &block) | |
Generate SignatureInfo from a block. More... | |
void | setSignatureType (tlv::SignatureTypeValue type) |
Set SignatureType. More... | |
int32_t | getSignatureType () const |
Get SignatureType. More... | |
bool | hasKeyLocator () const |
Check if KeyLocator is set. More... | |
void | setKeyLocator (const KeyLocator &keyLocator) |
Set KeyLocator. More... | |
void | unsetKeyLocator () |
Unset KeyLocator. More... | |
const KeyLocator & | getKeyLocator () const |
Get KeyLocator. More... | |
void | setValidityPeriod (const security::ValidityPeriod &validityPeriod) |
Set ValidityPeriod. More... | |
void | unsetValidityPeriod () |
Unset ValidityPeriod. More... | |
security::ValidityPeriod | getValidityPeriod () const |
Get ValidityPeriod. More... | |
void | appendTypeSpecificTlv (const Block &block) |
Append signature type specific tlv block. More... | |
const Block & | getTypeSpecificTlv (uint32_t type) const |
Get signature type specific tlv block. More... | |
template<encoding::Tag TAG> | |
size_t | wireEncode (EncodingImpl< TAG > &encoder) const |
Encode to a wire format or estimate wire format. More... | |
const Block & | wireEncode () const |
Encode to a wire format. More... | |
void | wireDecode (const Block &wire) |
Decode from a wire format. More... | |
bool | operator== (const SignatureInfo &rhs) const |
bool | operator!= (const SignatureInfo &rhs) const |
Definition at line 32 of file signature-info.hpp.
ndn::SignatureInfo::SignatureInfo | ( | ) |
Definition at line 37 of file signature-info.cpp.
Referenced by ndn::SignatureInfo::Error::Error().
|
explicit |
Definition at line 43 of file signature-info.cpp.
ndn::SignatureInfo::SignatureInfo | ( | tlv::SignatureTypeValue | type, |
const KeyLocator & | keyLocator | ||
) |
Definition at line 49 of file signature-info.cpp.
|
explicit |
Generate SignatureInfo from a block.
tlv::Error | if supplied block is not formatted correctly |
Definition at line 56 of file signature-info.cpp.
References wireDecode().
void ndn::SignatureInfo::setSignatureType | ( | tlv::SignatureTypeValue | type | ) |
Set SignatureType.
Definition at line 62 of file signature-info.cpp.
References ndn::Block::reset().
Referenced by ndn::SignatureInfo::Error::Error(), and ndn::security::KeyChain::prepareUnsignedIdentityCertificate().
|
inline |
Get SignatureType.
Definition at line 66 of file signature-info.hpp.
Referenced by ndn::Signature::getType(), and ndn::Signature::operator bool().
|
inline |
Check if KeyLocator is set.
Definition at line 73 of file signature-info.hpp.
References appendTypeSpecificTlv(), getKeyLocator(), getTypeSpecificTlv(), getValidityPeriod(), operator==(), setKeyLocator(), setValidityPeriod(), unsetKeyLocator(), unsetValidityPeriod(), wireDecode(), and wireEncode().
Referenced by ndn::security::CommandInterestValidator::checkPolicy(), ndn::Signature::hasKeyLocator(), and nfd::CommandAuthenticator::makeAuthorization().
void ndn::SignatureInfo::setKeyLocator | ( | const KeyLocator & | keyLocator | ) |
Set KeyLocator.
Definition at line 69 of file signature-info.cpp.
References ndn::Block::reset().
Referenced by hasKeyLocator(), ndn::security::KeyChain::prepareUnsignedIdentityCertificate(), ndn::security::KeyChain::selfSign(), and ndn::Signature::setKeyLocator().
void ndn::SignatureInfo::unsetKeyLocator | ( | ) |
Unset KeyLocator.
Definition at line 77 of file signature-info.cpp.
References ndn::tlv::KeyLocator, and ndn::Block::reset().
Referenced by hasKeyLocator(), and ndn::Signature::unsetKeyLocator().
const KeyLocator & ndn::SignatureInfo::getKeyLocator | ( | ) | const |
Get KeyLocator.
SignatureInfo::Error | if keyLocator does not exist |
Definition at line 85 of file signature-info.cpp.
Referenced by ndn::security::CommandInterestValidator::checkPolicy(), ndn::Signature::getKeyLocator(), hasKeyLocator(), and nfd::CommandAuthenticator::makeAuthorization().
void ndn::SignatureInfo::setValidityPeriod | ( | const security::ValidityPeriod & | validityPeriod | ) |
Set ValidityPeriod.
Definition at line 94 of file signature-info.cpp.
References unsetValidityPeriod(), and ndn::security::ValidityPeriod::wireEncode().
Referenced by hasKeyLocator().
void ndn::SignatureInfo::unsetValidityPeriod | ( | ) |
Unset ValidityPeriod.
Definition at line 101 of file signature-info.cpp.
References ndn::Block::reset(), and ndn::tlv::ValidityPeriod.
Referenced by hasKeyLocator(), and setValidityPeriod().
security::ValidityPeriod ndn::SignatureInfo::getValidityPeriod | ( | ) | const |
Get ValidityPeriod.
Definition at line 110 of file signature-info.cpp.
References ndn::tlv::ValidityPeriod.
Referenced by hasKeyLocator().
void ndn::SignatureInfo::appendTypeSpecificTlv | ( | const Block & | block | ) |
Append signature type specific tlv block.
Definition at line 120 of file signature-info.cpp.
References ndn::Block::reset().
Referenced by hasKeyLocator().
const Block & ndn::SignatureInfo::getTypeSpecificTlv | ( | uint32_t | type | ) | const |
Get signature type specific tlv block.
SignatureInfo::Error | if the block does not exist |
Definition at line 128 of file signature-info.cpp.
Referenced by hasKeyLocator().
size_t ndn::SignatureInfo::wireEncode | ( | EncodingImpl< TAG > & | encoder | ) | const |
Encode to a wire format or estimate wire format.
Definition at line 142 of file signature-info.cpp.
References ndn::encoding::prependNonNegativeIntegerBlock(), ndn::tlv::SignatureInfo, ndn::tlv::SignatureType, and ndn::KeyLocator::wireEncode().
Referenced by ndn::Signature::getInfo().
const Block & ndn::SignatureInfo::wireEncode | ( | ) | const |
Encode to a wire format.
Definition at line 169 of file signature-info.cpp.
References ndn::Block::hasWire().
Referenced by hasKeyLocator().
void ndn::SignatureInfo::wireDecode | ( | const Block & | wire | ) |
Decode from a wire format.
Definition at line 185 of file signature-info.cpp.
References ndn::Block::elements_begin(), ndn::Block::elements_end(), ndn::Block::hasWire(), ndn::tlv::KeyLocator, ndn::Block::parse(), ndn::encoding::readNonNegativeInteger(), ndn::tlv::SignatureInfo, ndn::tlv::SignatureType, ndn::Block::type(), and ndn::KeyLocator::wireDecode().
Referenced by ndn::security::CommandInterestValidator::checkPolicy(), hasKeyLocator(), nfd::CommandAuthenticator::makeAuthorization(), and SignatureInfo().
bool ndn::SignatureInfo::operator== | ( | const SignatureInfo & | rhs | ) | const |
Definition at line 225 of file signature-info.cpp.
Referenced by hasKeyLocator().
|
inline |
Definition at line 136 of file signature-info.hpp.