|
Botan 3.12.0
Crypto and TLS for C&
|
#include <asn1_print.h>
Public Member Functions | |
| ASN1_Formatter (bool print_context_specific, size_t max_depth, bool require_der=false) | |
| template<typename Alloc> | |
| std::string | print (const std::vector< uint8_t, Alloc > &vec) const |
| std::string | print (const uint8_t in[], size_t len) const |
| void | print_to_stream (std::ostream &out, const uint8_t in[], size_t len) const |
| virtual | ~ASN1_Formatter ()=default |
Protected Member Functions | |
| virtual std::string | format (ASN1_Type type_tag, ASN1_Class class_tag, size_t level, size_t length, std::string_view value) const =0 |
| virtual std::string | format_bin (ASN1_Type type_tag, ASN1_Class class_tag, const std::vector< uint8_t > &vec) const =0 |
| virtual std::string | format_bn (const BigInt &bn) const =0 |
Format ASN.1 data and call a virtual to format
Definition at line 23 of file asn1_print.h.
|
virtualdefault |
|
inline |
| print_context_specific | if true, try to parse nested context specific data. |
| max_depth | do not recurse more than this many times. If zero, recursion is unbounded. |
| require_der | if true then non-canonical BER data is rejected |
Definition at line 33 of file asn1_print.h.
Referenced by Botan::ASN1_Pretty_Printer::ASN1_Pretty_Printer().
|
protectedpure virtual |
This is called for each element
|
protectedpure virtual |
This is called to format binary elements that we don't know how to convert to a string. The result will be passed as value to format; the tags are included as a hint to aid decoding.
TODO(Botan4) change the vector to a span
|
protectedpure virtual |
This is called to format integers
|
inline |
Definition at line 41 of file asn1_print.h.
References print().
| std::string Botan::ASN1_Formatter::print | ( | const uint8_t | in[], |
| size_t | len ) const |
Definition at line 78 of file asn1_print.cpp.
References print_to_stream().
Referenced by print().
| void Botan::ASN1_Formatter::print_to_stream | ( | std::ostream & | out, |
| const uint8_t | in[], | ||
| size_t | len ) const |
Definition at line 84 of file asn1_print.cpp.
References Botan::BER_Decoder::Limits::BER(), and Botan::BER_Decoder::Limits::DER().
Referenced by print().