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.
const_iterator value_end() const noexcept
Get end iterator of TLV-VALUE.
size_t size() const
Return the size of the encoded wire, i.e., of the whole TLV.
static std::tuple< bool, Block > fromBuffer(ConstBufferPtr buffer, size_t offset=0)
Try to parse Block from a wire buffer.
uint32_t type() const noexcept
Return the TLV-TYPE of the Block.
const_iterator value_begin() const noexcept
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) noexcept
Determine whether a TLV-TYPE is "critical" for evolvability purpose.