41 CertificateBundleDecoder::decode()
43 auto onThrow = make_scope_fail([
this] { m_hasError =
true; });
45 while (!m_bufferedData.empty()) {
53 m_bufferedData.erase(m_bufferedData.begin(), m_bufferedData.begin() + element.
size());
Represents a TLV element of the NDN packet format.
uint32_t type() const
Return the TLV-TYPE of the Block.
size_t size() const
Return the size of the encoded wire, i.e.
static std::tuple< bool, Block > fromBuffer(ConstBufferPtr buffer, size_t offset=0)
Try to parse Block from a wire buffer.
Buffer::const_iterator value_end() const
Get end iterator of TLV-VALUE.
Buffer::const_iterator value_begin() const
Get begin iterator of TLV-VALUE.
util::Signal< CertificateBundleDecoder, Certificate > onCertDecoded
Emitted every time a certificate is successfully decoded.
void append(const Block &block)
Append a bundle segment to the internal decoding buffer and trigger decoding.
represents an error in TLV encoding or decoding
std::string to_string(const errinfo_stacktrace &x)
constexpr bool isCriticalType(uint32_t type)
Determine whether a TLV-TYPE is "critical" for evolvability purpose.