39 CertificateBundleDecoder::decode()
41 auto onThrow = make_scope_fail([
this] { m_hasError =
true; });
43 while (!m_bufferedData.empty()) {
49 m_bufferedData.erase(m_bufferedData.begin(), m_bufferedData.begin() + element.size());
55 NDN_THROW(tlv::Error(
"Unrecognized element of critical type " +
to_string(element.type())));
Represents a TLV element of the NDN packet format.
const_iterator value_end() const noexcept
Get end iterator of TLV-VALUE.
static std::tuple< bool, Block > fromBuffer(ConstBufferPtr buffer, size_t offset=0)
Try to parse Block from a wire buffer.
const_iterator value_begin() const noexcept
Get begin iterator of TLV-VALUE.
signal::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.