25 #ifndef NDN_CXX_SECURITY_CERTIFICATE_HPP
26 #define NDN_CXX_SECURITY_CERTIFICATE_HPP
Represents a TLV element of the NDN packet format.
span< const uint8_t > value_bytes() const noexcept
Return a read-only view of TLV-VALUE as a contiguous range of bytes.
Represents a Data packet.
const Block & getContent() const noexcept
Get the Content element.
Represents an absolute name.
Represents a name component.
Represents a ValidityPeriod TLV element.
Represents an NDN certificate.
bool isValid(const time::system_clock::TimePoint &ts=time::system_clock::now()) const
Check if the certificate is valid at ts.
name::Component getIssuerId() const
Get issuer ID.
static const name::Component KEY_COMPONENT
Name getKeyName() const
Get key name.
static const name::Component DEFAULT_ISSUER_ID
Name getIdentity() const
Get identity name.
ValidityPeriod getValidityPeriod() const
Get validity period of the certificate.
static const ssize_t KEY_COMPONENT_OFFSET
static const size_t MIN_KEY_NAME_LENGTH
static bool isValidName(const Name &certName)
Check if the specified name follows the naming convention for the certificate.
name::Component getKeyId() const
Get key ID.
static const size_t MIN_CERT_NAME_LENGTH
static const ssize_t ISSUER_ID_OFFSET
span< const uint8_t > getPublicKey() const noexcept
Return the public key as a DER-encoded SubjectPublicKeyInfo structure, i.e., exactly as it appears in...
static const ssize_t VERSION_OFFSET
static const ssize_t KEY_ID_OFFSET
Block getExtension(uint32_t type) const
Get extension with TLV type.
static time_point now() noexcept
Error(const char *expectedType, uint32_t actualType)
std::ostream & operator<<(std::ostream &os, const AdditionalDescription &desc)
Name extractKeyNameFromCertName(const Name &certName)
Extract key name from the certificate name certName.
Name extractIdentityFromCertName(const Name &certName)
Extract identity namespace from the certificate name certName.